非常简单,直接上脚本,上图


$credential = Get-Credential [email protected]

Install-Module MsOnline ; Import-Module MsOnline

Connect-MsolService -credential $credential

$exchSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $credential -Authentication Basic -AllowRedirection

Import-PSSession $exchSession –DisableNameChecking


使用Powershell 登陆Exchange online_第1张图片