November, 2016

Deleting 30000 drivers and re-importing 162 Driver packs

We started noticing our driver packages were really big and consuming a lot of time during OSD. This was due to the bug mentioned in KB3084586

The longer we left it the worse it got!

What happens is any drivers added to the database before the fix will still have issues being re-imported unless they have been deleted before the re-import. So the solution for us was to get rid of every driver then add them back.

There are a few scripts online to import drivers and I merged some together to fit our environment however during testing they would often stop working after a few imports as if powershell wasn't getting a response back. To work around this I used a powershell function called start-job with a timeout so it would move to the next import if it had no response.

Script can be downloaded from Github here

 

To delete all drivers first it's just one line

Get-CMDriver | Remove-CMDriver -force

This took 6 hours in my environment..

OPTIONAL: To set driver packages to high priority run this script
(
modify cd PS1:)

Then modify the sitecode var in the main script (ImportDriver.ps1)

$sitecode = “PS1:”

for each driver package you run the powershell script with parameters

.\ImportDriver.ps1 -DriverPackageName "DELL E7470 WIN10 x64" -DriverSource "\\Server\OSD Drivers\Sources\Windows 10\x64\E7470" -DriverPkgSource "\\Server\OSD Drivers\Windows 10\x64\E7470"

It also creates packages and categories if they don't exist. Also updates the distribution points.

This took 3 days in my environment... If I did this again, I would have imported the WIN7 drivers first as this change impacted 1 business day of imaging.

Update: I've noticed the Intel HD Graphics 5xx drivers must have timed out during the import, we have now imported them manually.

 

MDT Toolkit files fail to download - could not resolve source

IMG_6554

If this happens during OSD, it is likely due to 2 settings in the BIOS.

 

I recommend

WIN7 -

Boot mode: Legacy
Sata mode: AHCI

Win10-

Boot mode: UEFI
Sata mode: AHCI

 

 

From the log:
The task sequence execution engine failed executing the action (Use Toolkit Package) in the group (Initialization) with the error code 2147942561
Action output: ... ursiveCreatePath(sPath.substr(0, nPos), psa), HRESULT=800700a1 (e:\nts_sccm_release\sms\framework\core\ccmcore\path.cpp,104)
RecursiveCreatePath(sPath.substr(0, nPos), psa), HRESULT=800700a1 (e:\nts_sccm_release\sms\framework\core\ccmcore\path.cpp,104)
RecursiveCreatePath( sNormalizedPath, psa ), HRESULT=800700a1 (e:\nts_sccm_release\sms\framework\core\ccmcore\path.cpp,159)
DownloadContentLocally (pszSource, sSourceDirectory, dwFlags, hUserToken, mapNetworkAccess), HRESULT=800700a1 (e:\nts_sccm_release\sms\framework\tscore\resolvesource.cpp,3582)
TS::Utility::ResolveSource (pszPkgID, sPath, 0, hUserToken, mapNetworkAccess), HRESULT=800700a1 (e:\nts_sccm_release\sms\client\osdeployment\installsoftware\runcommandline.cpp,399)
cmd.Execute(pszPkgID,sProgramName, dwCmdLineExitCode), HRESULT=800700a1 (e:\nts_sccm_release\sms\client\osdeployment\installsoftware\main.cpp,372)
Failed to resolve the source for SMS PKGID=PS10098B, hr=0x800700a1
Install Software failed to run command line, hr=0x800700a1. The operating system reported error 2147942561: The specified path is invalid.