问题描述
场景
我在 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 (将#修改为@)