Last active
July 22, 2016 07:08
-
-
Save vMarkusK/c45904556f8464e711d6891f7872c57f to your computer and use it in GitHub Desktop.
Reports all vSphere VM UUIDs
This file contains hidden or 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
$myVMs = Get-VM TST* | sort Name | |
$MyView = @() | |
ForEach ($myVM in $myVMs){ | |
$UUIDReport = [PSCustomObject] @{ | |
Name = $myVM.name | |
UUID = $myVM.extensiondata.Config.UUID | |
InstanceUUID = $myVM.extensiondata.config.InstanceUUID | |
LocationID = $myVM.extensiondata.config.LocationId | |
MoRef = $myVM.extensiondata.Moref.Value | |
} | |
$MyView += $UUIDReport | |
} | |
$MyView | ft -AutoSize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment