为什么我得到这个错误是随机的。,Powershell脚本有时工作正常,有时不工作抛出以下错误。
Connect-MsolService : An error occurred while making the HTTP request to
https://provisioningapi.microsoftonline.com/provisioningwebservice.svc. This could be due to the fact that the server
certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the
security binding between the client and the server.
At D:\O365License\Licensing.ps1:28 char:1
+ Connect-MsolService -Credential $cred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [Connect-MsolService], CommunicationException
+ FullyQualifiedErrorId :
System.ServiceModel.CommunicationException,Microsoft.Online.Administration.Automation.ConnectMsolService 发布于 2019-01-09 06:20:30
您可能正在遭受与TLS1.2的.NET相关的问题。在运行Connect-MsolService命令之前尝试运行此命令。
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12https://stackoverflow.com/questions/54058583
复制相似问题