如何解决运行 Enable-AzVMPSRemoting 后对 Enter-AzVM 的 MI_RESULT_FAILED 响应
场景
我在 Azure Cloud Shell 中成功运行了这两个命令。
Enable-AzVMPSRemoting -Name 'vm-name' -ResourceGroupName 'resource-group-name' -Protocol https -OsType Windows
Enable-AzVMPSRemoting -Name 'vm-name' -ResourceGroupName 'resource-group-name' -Protocol http -OsType Windows
在 Azure 门户中,我检查了端口 5985-5986 现在是否已打开。这很好,表明上述命令有效。在同一个 Azure Cloud Shell 会话中,我然后运行以下命令:
Enter-AzVM -Name 'vm-name' -ResourceGroupName 'resource-group-name' -Credential (get-credential)
输出是:
PowerShell credential request
Enter your credentials.
User: ishmael
Password for user ishmael: *************
Enter-PSSession: /usr/local/share/powershell/Modules/PSCloudShellUtility/PSCloudShellUtility.psm1:958
Line |
958 | Enter-PSSession -ComputerName $cName -Credential $Credential …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Connecting to remote server 11.22.33.44 failed with the following error message : MI_RESULT_FAILED
| For more information,see the about_Remote_Troubleshooting Help topic.
问题
从 Azure Cloud Shell 连接还需要哪些进一步的步骤?
注意:我还尝试将用户名设置为 UserDomain\ishmael
和 ishmael@UserDomain
,其中 UserDomain
的值是目标远程服务器上 $env:UserDomain
的结果。
资源
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。