- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
尝试使用 PowerShell 连接到 Azure 时出现以下错误。该帐户以前可以使用,但不确定发生了什么变化。已为组织启用多重身份验证,但应排除此帐户。这是一个组织帐户;不是微软帐户。我在网上发现了类似的错误,但不是这个特定的问题......
Connect-AzureRmAccount –Credential $Credential -Verbose
VERBOSE: Performing the operation "log in" on target "User account in environment 'AzureCloud'".
Connect-AzureRmAccount : accessing_ws_metadata_exchange_failed: Accessing WS metadata exchange failed: The underlying connection was closed: An unexpected error
occurred on a send.
At line:1 char:1
+ Connect-AzureRmAccount –Credential $Credential -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Connect-AzureRmAccount], AadAuthenticationFailedException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
我启用了调试输出以获取更多信息...
DEBUG: AzureQoSEvent: CommandName - Connect-AzureRmAccount; IsSuccess - False; Duration - 00:00:19.9521148; Exception - Microsoft.Azure.Commands.Common.Authentica
tion.AadAuthenticationFailedException: accessing_ws_metadata_exchange_failed: Accessing WS metadata exchange failed: The underlying connection was closed: An unex
pected error occurred on a send. ---> Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: accessing_ws_metadata_exchange_failed: Accessing WS me
tadata exchange failed ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Una
ble to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existin
g connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.IdentityModel.Clients.ActiveDirectory.HttpWebRequestWrapper.<GetResponseSyncOrAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.MexParser.<FetchMexAsync>d__4.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.RunAsyncTask[T](Task`1 task)
at Microsoft.Azure.Commands.Common.Authentication.UserTokenProvider.DoAcquireToken(AdalConfiguration config, PromptBehavior promptBehavior, Action`1 promptActi
on, String userId, SecureString password)
at Microsoft.Azure.Commands.Common.Authentication.UserTokenProvider.SafeAquireToken(AdalConfiguration config, String showDialog, Action`1 promptAction, String
userId, SecureString password, Exception& ex)
--- End of inner exception stack trace ---
at Microsoft.Azure.Commands.Common.Authentication.UserTokenProvider.AcquireToken(AdalConfiguration config, String promptBehavior, Action`1 promptAction, String
userId, SecureString password)
at Microsoft.Azure.Commands.Common.Authentication.UserTokenProvider.GetAccessToken(AdalConfiguration config, String promptBehavior, Action`1 promptAction, Stri
ng userId, SecureString password, String credentialType)
at Microsoft.Azure.Commands.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzureAccount account, IAzureEnvironment environment, String ten
ant, SecureString password, String promptBehavior, Action`1 promptAction, IAzureTokenCache tokenCache, String resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureAccount account, IAzureEnvironment environment, String tenantId, Se
cureString password, String promptBehavior, Action`1 promptAction)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.ListAccountTenants(IAzureAccount account, IAzureEnvironment environment, SecureString passwo
rd, String promptBehavior, Action`1 promptAction)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account, IAzureEnvironment environment, String tenantId, String subscrip
tionId, String subscriptionName, SecureString password, Boolean skipValidation, Action`1 promptAction, String name)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass83_0.<ExecuteCmdlet>b__0(AzureRmProfile localProfile, RMProfileClient profile
Client, String name)
at Microsoft.Azure.Commands.Profile.Common.AzureContextModificationCmdlet.ModifyContext(Action`2 contextAction)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.SetContextWithOverwritePrompt(Action`3 setContextAction)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 11:22:02 AM - ConnectAzureRmAccountCommand end processing.
DEBUG: 11:22:02 AM - ConnectAzureRmAccountCommand end processing.
最佳答案
问题是 Connect-AzureRMAccount cmdlet 默认使用 TLS 1.0。 Centrify 禁用了 TLS 1.0 支持,这导致身份验证尝试关闭连接。通过将以下内容添加到 PowerShell 脚本以强制使用 TLS 1.2 安全协议(protocol),该问题得到解决:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
关于powershell - 连接-AzureRmAccount : accessing_ws_metadata_exchange_failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51331071/
我尝试用 google 搜索此内容,但尽管搜索列表中有许多有希望的项目,但它们全部都是关于 ARM 与 ASM 或 Add-AzureRmAccount 与 Connect-AzureRmAccoun
我在 Azure PowerShell 中遇到了问题。我无法连接到 AzureRM 帐户。它显示此错误: Connect-AzureRMAccount : The term 'Connect-Azur
我在使用 Azure PS 模块时遇到问题。我已经通过 PS gallery 安装了以下内容: Install-Module AzureRM Install-Module Azure (并重新启动)
我想将 Add-AzureRmAccount 与我的 Microsoft 帐户凭据一起使用,但我不知道该怎么做。我想创建一个由 Windows 任务计划程序运行的非交互式脚本。因此,我无法使用交互式登
尝试使用 PowerShell 连接到 Azure 时出现以下错误。该帐户以前可以使用,但不确定发生了什么变化。已为组织启用多重身份验证,但应排除此帐户。这是一个组织帐户;不是微软帐户。我在网上发现了
我有一个关于 Login-AzureRmAccount cmdlet 的问题,我正在尝试解决这个问题。当我运行 Login-AzureRmAccount 并使用我的凭据进行身份验证时,凭据对象是否存储
Add-AzureRmAccount 或别名 Login-AzureRmAccount 似乎不像 Add-AzureAccount 那样在 session 之间持续存在。 有办法让它持续下去吗? 最佳
我利用 ARM 模板自动化了几个步骤来进行 Java/Tomcat 部署,但在通过证书自动登录方面没有取得成功。 我已使用 OpenSSL 为虚构域“project.company.com”创建了自签
我的 Azure 帐户有两个与之关联的目录 - 一个用于生产环境,一个用于测试环境。目前,当我运行 Login-AzureRmAccount 时,它会登录到生产订阅。是否可以在 Azure RM 端配
我正在尝试验证脚本以通过 PowerShell 连接到 Azure。 $username = "asdfasdf" $password = "asdfasdf" $secstr = New-Objec
当我尝试从 VS Code 终端登录 Azure RM 时,它只是挂起。不显示登录/密码提示。 有什么方法可以从该终端登录吗?否则,运行/调试 Azure PS 脚本会变得比应有的更加复杂:) 最佳答
我想通过 power shell 使用以下命令在 azure 中创建一个新的资源组: New-AzureRmResourceGroup - Name name -Location "WesternEu
我正在构建一个 Azure Function(托管在应用服务计划中),它将枚举我的订阅中的 Assets 并使用它们执行某些操作。 我的网站设置方式符合我的预期,但每次登录-AzureRmAccoun
我已经在 Windows server 2012 R2 上安装了 AzureRm 和 Azure 模块。我可以从此模块运行其他 cmdlet(例如,AddAzureRmAccount、Get-Azur
我正在使用 powershell 脚本登录到 azure,为此我编写了简单的命令“Login-AzureRmAccount”,并在单击按钮时将该脚本调用到 C# 代码中。它在本地工作正常,但是当我在服
我已经在我的 Ubuntu 机器上安装了 Powershell。当我在 PowerShell 中输入 Login-AzureRmAccount 时,出现如下错误: PS> Login-AzureRmA
我有一个使用 Connect-AzureAD 和 Login-AzureRmAccount 的 PowerShell 脚本。尽管两者都使用相同的凭据,但我还是被要求输入两次。有没有办法只提示用户一次并
正如标题所暗示的,我正在尝试在 Powershell 中自动执行 AzureRMAccount 的登录过程。 我搜索了我能找到的每个网站上的每个论坛,尝试了每种不同的解决方案组合(好吧,除了有效的解决
我正在尝试通过脚本以非交互方式登录我的 Azure 帐户。我只是不知道为什么会失败: $secpasswd = ConvertTo-SecureString "P@$$W0rd" -AsPlainTe
我正在尝试使用 Azure 自动化帐户系统管理身份选项关闭 VM。 但是我最终遇到了以下错误。 根据其他文章,提到升级模块 Update-ModulesInAutomationToLatestVers
我是一名优秀的程序员,十分优秀!