Created
March 6, 2017 05:58
-
-
Save tonysangha/3818bdfd2dc1c22117bbd819c56264da to your computer and use it in GitHub Desktop.
Get Hosts and VMs that belong to certain vSphere clusters using PowerCLI - (OR) Statement
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
$clusters = get-cluster | |
$clusters | Where-Object {$_.name -like "XXXXX" -OR $_.name -like "XXXXX"} | get-vmhost | select name, Manufacturer, Model, ProcessorType, NumCpu, Version, Build, Parent | |
$clusters | Where-Object {$_.name -like "XXXXX" -OR $_.name -like "XXXXX"} | get-vm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment