LucD
Leadership
Leadership

You could do something like this

$cmd = @"

Get-WmiObject -Query 'Select * from Win32_SoftwareFeature Where ProductName LIKE "VMware Tools%" and InstallState=3'|

Select Caption

"@

Get-VM | %{

$result = Invoke-VMScript -VM $_ -ScriptType Powershell -ScriptText $cmd

if($result.ScriptOutput -match "vShield Drivers"){

  Write-Output "vShield drivers installed on $($_.Name)"

}

else{

  Write-Output "vShield drivers not installed on $($_.Name)"

}

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos