Skip to content

Instantly share code, notes, and snippets.

@VertigoRay
Last active December 14, 2015 09:50
Show Gist options
  • Save VertigoRay/5068130 to your computer and use it in GitHub Desktop.
Save VertigoRay/5068130 to your computer and use it in GitHub Desktop.
SCCM 2012 - Driver Importing. This code to deletes drivers with bad sources.
$a = (Get-WmiObject -ComputerName 'myserver.fqdn' -Namespace 'root\SMS\Site_XXX' -Class 'SMS_Driver' | ?{!(test-path $_.ContentSourcePath)})
$a | %{$_.delete()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment