Cannot resolve wildcard DNS with Resolve-DnsName : DNS_ERROR_INVALID_NAME_CHAR,Microsoft.DnsClient.Commands.ResolveDnsName

161 views Asked by At

I cannot resolve wildcard DNS with Resolve-DnsName but it works with nslookup :

PS C:\> Resolve-DnsName -name *.mydomain.com
Resolve-DnsName : *.mydomain.com : DNS name contains an invalid character
At line:1 char:1
+ Resolve-DnsName *.mydomain.com
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (*.mydomain.com:String) [Resolve-DnsName], Win32Exception
    + FullyQualifiedErrorId : DNS_ERROR_INVALID_NAME_CHAR,Microsoft.DnsClient.Commands.ResolveDnsName

PS C:\> 

I tried to escape the * character with the ` character but it does not work either.

0

There are 0 answers