Deploys Windows VMs under LB,configures WinRM Https

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check

Deploy To Azure Deploy To Azure US Gov Visualize

Description of Template

This template allows you to create a set of Virtual Machines under a Load Balancer. It also configures a WinRM https listener by creating a new test certificate.

The template uses a custom script extension which executes the script 'ConfigureWinRM.ps1' on the target VMs. This script creates a self signed certificate and configures the WinRM Https listener using the certificate's thumbprint.

How to connect to a Target Azure VM post WinRM configuration

Use the below script to connect to an azure vm post winrm configuration. Assign the exact fqdn of your azure vm to $hostname. The script pops up a credential window, provide the credentials of azure vm.

$hostName=<fqdn-of-vm>  #example: "myvm.westus.cloudapp.azure.com"
$winrmPort = '40003'

# Get the credentials of the machine
$cred = Get-Credential

# Connect to the machine
$soptions = New-PSSessionOption -SkipCACheck
Enter-PSSession -ComputerName $hostName -Port $winrmPort -Credential $cred -SessionOption $soptions -UseSSL

Tags: Microsoft.Compute/availabilitySets, Microsoft.Network/publicIPAddresses, Microsoft.Network/virtualNetworks, Microsoft.Network/networkInterfaces, Microsoft.Network/loadBalancers, Microsoft.Compute/virtualMachines, Microsoft.Compute/virtualMachines/extensions, CustomScriptExtension