I am trying to get DNS information on remote servers (via script or program I have yet to code).
On Windows boxes, I need to get DNS configuration. I have two ways of grabbing this information locally:
ipconfig /all
netsh interface ip show config
I could run these commands and pipe them into a find and out put it the way I want. The problem I have is running them remotely (I cannot use PSExec). netsh seems to have a remote tag, but the show config does not seem to work when running it remotely:
netsh -r IP_or_HostName interface ip show config
The following command was not found: interface ip show config.
It looks like all the command up to "config" works.
Any ideas of either how to use netsh to get the info I want or an alternative to find DNS information on a remtote machine?
tldr; How do I get DNS information from a remote machine (without using PSExec)?
Finally found/thought of something. One way to get it would be through WMI. You can access this by Powershell or VBS.