小编win*_*eye的帖子

如何通过具有凭据的代理服务器运行Azure PowerShell cmdlet?

当我运行以下Powershell cmdlet时(来自Azure管理工具Snapin):

get-osversions -subscriptionId **** -certificate (get-item cert:\CurrentUser\MY\******)
Run Code Online (Sandbox Code Playgroud)

我收到以下错误消息:

Get-OSVersions:远程服务器返回意外响应:(407)代理身份验证必需.在行:1 char:15 + get-osversions <<<< -subscriptionId *-certificate(get-item cert:\ CurrentUser\MY*****)+ CategoryInfo:CloseError:(:) [Get-OSVersions],ProtocolException + FullyQualifiedErrorId:Microsoft.Samples.AzureManagementTools.PowerShell.HostedS ervices.GetOSVersionsCommand

Get-OSVersions:对象引用未设置为对象的实例.在行:1 char:15 + get-osversions <<<< -subscriptionId * -certificate (get-item cert:\ CurrentUser\MY***)+ CategoryInfo:CloseError:(:) [Get-OSVersions],NullReferenceException + FullyQualifiedErrorId:Microsoft.Samples.AzureManagementTools.PowerShell.HostedS ervices.GetOSVersionsCommand

似乎这里的互联网代理服务器拒绝脚本所需的访问权限.

我在互联网上看了很多,似乎没有简单的解决方法,因为这个cmdlet没有有效的"-credentials"或代理服务器参数.

我知道有一个'Get-Credential'cmdlet,但我觉得它没有用.您如何将凭证传递给Azure cmdlet?

任何人都可以想到解决这个问题的方法吗?

...除了使用不同的非代理互联网连接?

我很难过.

非常感谢您的时间.

powershell credentials azure proxy-server http-status-code-407

6
推荐指数
2
解决办法
8778
查看次数