Last active
December 31, 2015 07:38
-
-
Save mrlesmithjr/7954983 to your computer and use it in GitHub Desktop.
Collect VM Guest Network settings for powered on vms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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