國內版shell
第一步: session
Import-Module msonline rest
Connect-MsolService get
輸入用戶名密碼 io
第二步: 密碼
Get-MsolUser」 di
第三步: vi
Set-ExecutionPolicy unrestricted co
$cred = Get-Credential ps
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $session
國際版
第一步:
Import-Module msonline
Connect-MsolService
輸入用戶名密碼
第二步:
Get-MsolUser」
第三步:
Set-ExecutionPolicy unrestricted
$cred = Get-Credential
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri 「https://outlook.office365.com/powershell-liveid/" -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $session