Skip to content

Instantly share code, notes, and snippets.

@mrlesmithjr
Last active December 31, 2015 07:38
Show Gist options
  • Save mrlesmithjr/7954983 to your computer and use it in GitHub Desktop.
Save mrlesmithjr/7954983 to your computer and use it in GitHub Desktop.
Collect VM Guest Network settings for powered on vms
#Provided by @mrlesmithjr
#EveryThingShouldBeVirtual.com
#
# Set variable for all VMs that are powered on
$vms = Get-vm | where { $_.PowerState -eq “PoweredOn”}
# Capture default info
Get-VMGuestNetworkInterface $vms
# Capture more details - Only works for Windows VMs
Get-VMGuestNetworkInterface $vms | Select VM, Name, IPPolicy, Ip, Dns, DefaultGateway, DnsPolicy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment