- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi gurus.
I am looking for a script the bring me the information of the DNS server/IP that a VM has
Get-vm | select name , Here is where I am having trouble getting the DNSserver for the vm
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That info is coming from the Guest OS, so it is not available for all operating systems.
For most Windows OS, and provided VMware Tools are running, you can do
Get-VM |
Select-Object Name, @{N = 'DNSServers'; E = { $_.ExtensionData.Guest.Net.dnsconfig.ipaddress -join '|'}}
To have this info for types of Guest OS, you could consider running a Guest OS native script
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
LucD
worked like a charm , thanks a bunch