Remote PowerShell to Windows VM with WinRM
Remote PowerShell to Windows VM with WinRM The Remote Desktop Protocol is great to access remotely a Windows Server machine. It is great for actions requiring visual but for actions which can be taken from a PowerShell prompt within the server, it would be best to directly access to a remote PowerShell session from our local computer. Today we will see how we use the Windows Remote Management included in Windows Server to gain access to a remote PowerShell session and therefore manage our server from our local computer through PowerShell. This post is composed by four parts: Open ports on Network Security Group and open ports on VM firewall Setup the certificate for HTTPS communication with SSL Configure WinRM Connect on remote session 1. Open ports on Network Security Group and open ports on VM firewall For Azure or AWS, on the security group, the port 5986 needs to be open. It is the port used by WinRM for a PowerShell remote connection over HTTPS. Next RDP to your VM and ...