我想通过使用PowerShell连接到Outlook Office 365。
以下步骤执行-
1)
PS C:\Windows\system32> $UserCredential = Get-Credential
2)
PS C:\Users> $s = New-PSSession -URI https://outlook.office365.com/PowerShell -Credential $UserCredential -AllowRedirection
New-PSSession:[outlook.office365.com]连接到远程服务器outlook.office365.com失败,并显示以下错误消息:[ClientAccessServer = MA1PR0101CA0048,BackEndServer =,RequestId = 6d22e2da-f0c9-4880-9936-1a3c12c1097b,TimeStamp = 9/23/2019 2:01:34 PM]拒绝访问有关更多信息,请参见about_Remote_Troubleshooting帮助主题。在线:1字符:6+ $ s = New-PSSession -URIhttps://outlook.office365.com/PowerShell-Cre ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~+ CategoryInfo:OpenError:(System.Manageme .... RemoteRunspace:RemoteRunspace)[New-PSSession],PSRemotingTransportExcep重刑+ FullyQualifiedErrorId:-2144108477,PSSessionOpenFailed
[尝试以管理员身份打开Powershell IDE。让我知道它是如何工作的。
欢呼!