Quantcast
Viewing all articles
Browse latest Browse all 3135

List powered-on virtual machines without vmware tools installed

Hello,

if you want to list all the powered-on virtual machines without vmware tools installed, you can use this powercli script:

 

# Change the value of this variable (regular expression), if you would want just some datastores (not all) from the script's output

$datastores=".+"

 

get-vm | where-object {$_.powerstate -ne "PoweredOff" } | % { get-view $_.ID } | where-object { ($_.Datastore -match $datastores) -and ($_.guest.toolsstatus -Notmatch ".*Ok.*") } | select Name

 

(Remember to use the Connect-VIServer cmdlet before!)

 

The script is based in this script.

 

 

Best regards,

Pablo


Viewing all articles
Browse latest Browse all 3135

Trending Articles