2
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PowerShellでOffice 365各種サービスに接続する

Last updated at Posted at 2019-09-28

はじめに

PowerShellでOffice 365各種サービスに接続する際の手順メモ。
一旦はOffice 365とExOだけ。ほかのサービスはそのうち。

前提

  • Windows 10(Win8.1以前だとサインインアシスタントが別途必要だったりする)
  • PowerShellの実行ポリシーがRemoteSigned以上に緩和されている(されていなければSet-ExecutionPolicy RemoteSignedを実行しておく)

Office 365

モジュールインストール(初回のみ)

Install-Module MSOnline

接続

Connect-MsolService

Exchange Online(接続時に多要素認証の利用なし)

モジュールインストール & 接続

Import-PSSession (New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential (Get-Credential) -Authentication Basic -AllowRedirection)

Exchange Online(接続時に多要素認証の利用あり)

モジュールインストール (初回のみ)

多要素認証を使用して Exchange Online PowerShell に接続するを参考に「Exchange Online リモート PowerShell モジュール」をインストールする。

接続

Connect-EXOPSSession

参考

https://docs.microsoft.com/ja-jp/office365/enterprise/powershell/connect-to-office-365-powershell
https://docs.microsoft.com/ja-jp/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell
https://docs.microsoft.com/ja-jp/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell

以上

2
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?