Changing driver source paths in SCCM 2012 with powershell

From time to time I need to change the driver source file locations for all drivers imported in a SCCM 2012 environment. To do that I created a powershell command line utilizing some of the SCCM 2012 powershell cmdlets.

Get-WmiObject SMS_Driver -Namespace root\SMS\site_<SITECODE> | Where{$_.ContentSourcePath -like "*<StringToBeReplaced>} | %{$_.contentsourcepath = $_.contentsourcepath -replace "<StringToBeReplaced>", "<ReplacementString>";$_.put()}
This entry was posted in Operating System Deployment, SCCM 2012. Bookmark the permalink.