You may have seen my previous posts detailing how to enable WinRM over HTTPS on an Azure Resource Manager VM. I have now collated all the different bits of script and creates a single PowerShell function. The function is called Configure-WinRMHTTPS, and is as follows:
Once the function is loaded you must login to Azure. Then the function can be executed:
Login-AzureRmAccount Configure-AzureWinRMHTTPS -ResourceGroupName "TestGroup" -VMName "TestVM"
My next post will cover submitting the function to the PowerShell Gallery.