From e70e50600fcbc7a674943881e2e123812ce394e5 Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Wed, 30 Aug 2017 12:34:03 -0700 Subject: [PATCH] Create Get-VMToolsParts.ps1 Outputs the VMware Tool component installation state for all running Windows VMs in your environment. --- Scripts/Get-VMToolsParts.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Scripts/Get-VMToolsParts.ps1 diff --git a/Scripts/Get-VMToolsParts.ps1 b/Scripts/Get-VMToolsParts.ps1 new file mode 100644 index 0000000..c4a3d51 --- /dev/null +++ b/Scripts/Get-VMToolsParts.ps1 @@ -0,0 +1,11 @@ +$vms = Get-VM | where {$_.PowerState -eq "PoweredOn" -and $_.GuestId -match "Windows"} + +ForEach ($vm in $vms){ + Write-Host $vm + $namespace = "root\CIMV2" + $componentPattern = "hcmon|vmci|vmdebug|vmhgfs|VMMEMCTL|vmmouse|vmrawdsk|vmxnet|vmx_svga" + (Get-WmiObject -class Win32_SystemDriver -computername $vm -namespace $namespace | + where-object { $_.Name -match $componentPattern } | + Format-Table -Auto Name,State,StartMode,DisplayName + ) +}