Search code examples
powershellazurepowershell-remotingwinrm

Winrm is not avaliable on Windows Azure Windows VM


I'm setting the following ConfigurationSet in Virtual Machine Deployment

            <ConfigurationSet xsi:type="WindowsProvisioningConfigurationSet">
                <ConfigurationSetType>WindowsProvisioningConfiguration</ConfigurationSetType>
                <ComputerName>ROLE173D</ComputerName>
                <AdminUsername>myname</AdminUsername>
                <AdminPassword>mypassword</AdminPassword>
                <WinRm>
                    <Listeners>
                        <Listener>
                            <Protocol>Http</Protocol>
                        </Listener>
                        <Listener>
                            <Protocol>Https</Protocol>
                        </Listener>
                    </Listeners>
                </WinRm>
                <DisableSshPasswordAuthentication>false</DisableSshPasswordAuthentication>
            </ConfigurationSet>

Although the Window VM created (and the endpoint is set) it seems like it doesn't start the winrm service.

Edit

It seems like the winrm does run on port 5985 and the Endpoint is set to allow 5985, but the Windows VM firewall is blocking the access, is there away to open the firewall on the deployment?


Solution

  • The issue at the end of the day was a simple typo fix. The element should be WinRM and not WinRm. The fact that there's no schema nor runtime validation error really hidden the reason.

    Once the typo was fixed a winrm/https on a public port was set using a self signed certificate. While Winrm/http was set only for the internal network.