Configuring connections to VMs
Once an Azure VM has been created, we must consider how to allow administrative access. We will look at the access methods of Windows Remote Management (WinRM) and Remote Desktop Services Protocol (RDP) in the following sections.
WinRM access
We can connect via PowerShell Remoting to run PowerShell commands on remote computers such as Azure IaaS VMs; this uses the WinRM protocol and allows us to establish a remote connection to the computer.
To enable PowerShell Remoting, we need to use the following PowerShell cmdlet: Enable-PSRemoting
. The WinRM service will be started so that commands can be operated on the remote computer. The ports used are HTTP:5985
and HTTPS:5986
; all PowerShell remote communications are always encrypted by WinRM regardless of the protocol used (whether HTTP or HTTPS).
The outline of the process for setting up WinRM access to an Azure VM is as follows:
- An Azure key vault is created.
- A self-signed certificate...