basketcase

Powershell WMI Print Driver Query

Sep 22nd, 2010
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #change canon and PCL5 to query a different model/type
  2.  
  3. $installedDrivers = Get-WmiObject -Query "Select * from Win32_PrinterDriver where Name like 'canon%PCL5%'"
  4.  
  5. if($installedDrivers){Write-Host "Canon PCL5 Driver Installed"}
  6. else {Write-Host "All System's are a Go!"}
Add Comment
Please, Sign In to add comment