У меня есть виртуальные машины в диспетчере ресурсов, и я хочу делать удаленные сценарии PowerShell из runbook этих виртуальных машин. Я уже знаю, как это сделать в классических виртуальных машинах и использовать с успехом.Как PSSession VM из диспетчера ресурсов?
Теперь удаленный PowerShell через SSL с сертификатом, включенным по умолчанию на Azure VM, созданным с помощью Azure Resource Manager? Как подключиться с помощью Enter-PSSession или Invoke-Command?
Я пробовал этот код без успеха.
Enter-PSSession -ComputerName <public-IP> -Credential $cred -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck)
И я получил эту ошибку
Enter-PSSession : Connecting to remote server <public-IP> failed with the following error message : The WinRM client
cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not
joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts
configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not
be authenticated. You can get more information about that by running the following command: winrm help config. For more
information, see the about_Remote_Troubleshooting Help topic.
Примечание: То, что я бегу это с Powershell Runbook в Azure Automation. и попробовал ответить here
Настройте удаленную панель управления PowerShell с помощью HTTPS и повторите попытку. У вас должны быть «Transport = HTTPS» и «Port = 5986». –
@JackZeng Уже сделано это = '(но до сих пор не удалось удалять –