Forum Discussion
Unable to install AD Services on VM
One important thing did you allow WinRM from Network security group that attached to nic of the VM?
Yes your WinRM setting is correct and make sure you have run the winrm qc command on you client pc to allow firewall rules
kasunsjc wrote:
One important thing did you allow WinRM from Network security group that attached to nic of the VM?
Yes your WinRM setting is correct and make sure you have run the winrm qc command on you client pc to allow firewall rules
Hi
I have another chance to look at this today. I restarted my VM and noted my IPAddress
I think the rule needed to allow my WInRM access is set below
$rule4 = New-AzureRMNetworkSecurityRuleConfig -Name "WinRM_HTTP" -Description "Allow WinRM traffic over http" -Access Allow -Protocol Tcp -Direction Inbound -Priority 103 -SourceAddressPrefix * -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange 5985
Next, I need to add my VM to be trusted Host since I am using HTTP, start simple eh!
winrm set winrm/config/client '@{TrustedHosts="adVM"}'
Now, I hit my issue. I still don't see the how I can resolve the DNS address of my VM if I am on a different subnet.
Here is another test
Test-WsMan $pip.IpAddress Test-WsMan : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150859046" Machine="WSLDEV2015"><f:Message>WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet. </f:Message></f:WSManFault> At line:1 char:1 + Test-WsMan $pip.IpAddress
- Daniel WesterdaleNov 27, 2017Iron Contributor
Hi kasunsjc
My "clever workaround" is really temporary as every time I restart a VM I get a new IP address allocated. Hence, I still need a robust way of resolving the public ip address of any of my VMs from my Windows 10 client pc. - a sort of MyDNS equivalent .
I can work around this by RDPing to my VMS and adding them to domains etc. but not ideal as I want to do this in PS.