我在Powershell脚本中有以下评论:
#ERROR: Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send.
#EXPLANATION: PowerShell calls uses TLS 1.0 for web requests by default.
# However, Exchange is expecting a higher level of TLS, so you need to tell PowerShell to use 1.2 instead of the default of TLS 1.0
#SOLUTION(s):
# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
运行脚本时出现此错误:
s : The term 's' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At ps1:4 char:14
+ ​#SOLUTION(s):
+ ~
+ CategoryInfo : ObjectNotFound: (s:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
为什么抱怨评论?
如果我将其删除,则会抱怨SOLUTION本身...