1 $User = "admin@contoso.com"
2 $PWord = ConvertTo-SecureString –String "password" –AsPlainText -Force
3 $Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $User, $PWord
4 Import-Module MSOnline
5 Connect-MsolService -Credential $Credential
6 $sessionOption = New-PSSessionOption -SkipRevocationCheck
7 $ExchangeShell = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell-LiveID?PSVersion=2.0 -Credential $Credential -Authentication Basic -AllowRedirection -SessionOption $sessionOption
8 $importresults = Import-PSSession $ExchangeShell

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

相关文章:

  • 2022-02-16
  • 2021-09-04
  • 2021-12-22
  • 2022-12-23
  • 2021-06-30
  • 2021-12-17
  • 2022-01-07
猜你喜欢
  • 2021-07-28
  • 2022-12-23
  • 2021-04-01
  • 2021-06-30
  • 2021-07-27
  • 2021-08-23
  • 2021-09-13
相关资源
相似解决方案