无法将Powershell配置为Azure堆栈 [英] Unable to configure Powershell to Azure Stack
本文介绍了无法将Powershell配置为Azure堆栈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我导入最新模块并运行命令
Add-AzureStackAzureRmEnvironment -AadTenant $ AadTenant -Name AzureStack
我收到这样的错误
VERBOSE:从https://api.local.azurestack.external ... $ b中检索端点$ b Invoke-RestMethod:
网络错误
网络错误(tcp_error)
发生通信错误:"""
Web服务器可能已关闭,太忙或遇到阻止其响应请求的其他问题。您可能希望稍后再试一次。
如需帮助,请联系您的网络支持团队。
在C:\ Users \AzureStackAdmin \Desktop \AzureStack-Tools-master \Connect\AzureStack.Connect.psm1:123 char:18
+ ... endpoints = Invoke- RestMethod -Method Get -Uri" $($ ResourceManagerEnd ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo:InvalidOperation :( System.Net.HttpWebRequest:HttpWebRequest)[Invoke-RestMethod] ,WebException
+ FullyQualifiedErrorId:WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
您无法在空值表达式上调用方法。
在C:\ Users \AzureStackAdmin \Desktop \ AzureStack-Tools-master\Connect\AzureStack.Connect.psm1:130 char:1
+ $ azureEnvironmentParams = @ {
+ ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
+ CategoryInfo:InvalidOperation:(:) [],RuntimeException
+ FullyQualifiedErrorId:InvokeMethodOnNull
VERBOSE:添加AzureRm环境ronment AzureStack
Add-AzureRmEnvironment:无法将参数绑定到参数"Name",因为它为null。
在C:\ Users \AzureStackAdmin \Desktop\AzureStack-Tools-master\Connect\AzureStack.Connect.psm1:154 char:31
+ return Add-AzureRmEnvironment @azureEnvironmentParams
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo:InvalidData :( :) [Add-AzureRmEnvironment],ParameterBindingValidationException
+ FullyQualifiedErrorId:ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Azure.Commands.Profile.AddAzureRMEnvironmentCommand
任何人都可以提供帮助吗?
我想知道网络错误也是我无法打开门户网站的原因。
解决方案
请您指定运行此命令的位置?
谢谢
丹尼尔
When I imported the latest module, and run the command
Add-AzureStackAzureRmEnvironment -AadTenant $AadTenant -Name AzureStack
I got error like this
VERBOSE: Retrieving endpoints from the https://api.local.azurestack.external... Invoke-RestMethod : Network Error Network Error (tcp_error) A communication error occurred: "" The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time. For assistance, contact your network support team. At C:\Users\AzureStackAdmin\Desktop\AzureStack-Tools-master\Connect\AzureStack.Connect.psm1:123 char:18 + ... endpoints = Invoke-RestMethod -Method Get -Uri "$($ResourceManagerEnd ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand You cannot call a method on a null-valued expression. At C:\Users\AzureStackAdmin\Desktop\AzureStack-Tools-master\Connect\AzureStack.Connect.psm1:130 char:1 + $azureEnvironmentParams = @{ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull VERBOSE: Adding AzureRm environment AzureStack Add-AzureRmEnvironment : Cannot bind argument to parameter 'Name' because it is null. At C:\Users\AzureStackAdmin\Desktop\AzureStack-Tools-master\Connect\AzureStack.Connect.psm1:154 char:31 + return Add-AzureRmEnvironment @azureEnvironmentParams + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Add-AzureRmEnvironment], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Azure.Commands.Profile.AddAzureRMEnvironmentCommand
Anyone can help?
I wonder the network error is also the reason that I cann't open the portal.
解决方案
Hi,
Please can you specify where you are running this command from?
ThanksDaniel
这篇关于无法将Powershell配置为Azure堆栈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文