Exchangeログオンスクリプト

Cloud(Office365)

実行例 test.admin@test.comに管理者のアドレスを入力

write "-----Office 365の管理資格情報入力-----"
Import-Module MSOnline
$LiveCred = Get-Credential test.admin@hogehoge.com

##-----プロキシーがある時の設定-----"
$SessionOption = New-PSSessionOption -SkipRevocationCheck -ProxyAccessType IEConfig -ProxyAuthentication Negotiate

write "-----Exchange Onlineへの接続-----"
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Livecred -Authentication Basic -SessionOption $SessionOption -AllowRedirection
Import-PSSession $Session

write "-----Windows Azure AD への接続-----"
Import-Module MSOnline
Connect-MsolService -Credential $LiveCred

Exchange

$LiveCred = Get-Credential "takuji@yaguchi.onmicrosoft.com"
Import-Module MSOnline
Connect-MsolService -Credential $LiveCred
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session

※ショートカットのリンク先に Powershell -noexit


Address Lists

Organization ManagementにAddress Listsを追加。

$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session -AllowClobber



Skype for Business

skypeモジュールダウンロード


Import-Module LyncOnlineConnector
$userCredential = Get-Credential "takuji@yaguchi.onmicrosoft.com"
$sfbSession = New-CsOnlineSession -Credential $userCredential
Import-PSSession $sfbSession



  • 最終更新:2017-05-17 21:31:26

このWIKIを編集するにはパスワード入力が必要です

認証パスワード