If ((Get-WindowsCapability -Online -Name WMIC).State -eq "NotPresent") { return 0 } else { #Installed return 1 }