Powershell 登录O365 参考命令
Powershell 登录O365 参考命令如下:
1. MSOL
$Credential = get-credential
Connect-MsolService -Credential $Credential -AzureEnvironment AzureChinaCloud
2. EXO
$Credential = get-credential
$EXOSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell-LiveID/ -Credential $Credential -Authentication Basic -AllowRedirection -ea Stop
Import-PSSession $EXOSession -Verbose -ea stop -AllowClobber
3. SPO
$Credential = get-credential
Connect-SPOService -Url https://your tenant domain-admin.sharepoint.cn -Credential
4. LYO
$Credential = get-credential
$SFBSession = New-CsOnlineSession -Credential $Credential
Import-PSSession $SFBSession -ea stop -AllowClobber