Powershell连接世纪互联Office365

$User = "[email protected]"
$PWord = ConvertTo-SecureString –String "password" –AsPlainText -Force
$Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $User, $PWord
Import-Module MSOnline
Connect-MsolService -Credential $Credential
$sessionOption = New-PSSessionOption -SkipRevocationCheck
$ExchangeShell = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell-LiveID?PSVersion=2.0 -Credential $Credential -Authentication Basic -AllowRedirection -SessionOption $sessionOption
$importresults = Import-PSSession $ExchangeShell

by

http://www.smallrascal.cn/smallrascal/article.asp?id=2080

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。