Skip to content

Instantly share code, notes, and snippets.

@jbarber
Created July 5, 2010 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbarber/464370 to your computer and use it in GitHub Desktop.
Save jbarber/464370 to your computer and use it in GitHub Desktop.
Find all VMs with tools not OK
# Find all VMs without the tools at the latest version/enabled
connect-viserver -server virtualcenter
get-view -viewtype "VirtualMachine" `
| ?{ $_.runtime.powerstate -like 'poweredOn' } `
| ?{ $_.guest.toolsstatus -notlike 'toolsok' } `
| Sort-Object {$_.guest.toolsstatus} `
| format-table name, {$_.guest.toolsstatus}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment