On my new Azure 2012r2 boxes in a DMZ I can't get a WMI query to work with a FQDN reference. These queries run from the local machine, but need to reference it by FQDN to work with our monitoring solution.
It is erroring out with 'access is denied'. The hostname, public IP, loopback all work perfectly. How do I fix this?
$objSWbemLocator = New-Object -comobject WbemScripting.SWbemLocator
$objSWbemServices = $objSWbemLocator.ConnectServer("passport.external.mydomain.org") <-- Broken
$objSWbemServices = $objSWbemLocator.ConnectServer("passport")
$objSWbemServices = $objSWbemLocator.ConnectServer("127.0.0.1")
$objSWbemServices = $objSWbemLocator.ConnectServer("10.15.14.7")
I did some digging and it looks like I'm getting a network logon failure corresponding to these WMI issues. It varies slightly - depending on if I've added passport.external.mydomain.org
to the HOSTS file on the loopback address - but it's always logon type 3 (network) with a status of 0xC000006D (bad username or authentication information).