Sunday 25 August 2013

ConfigMgr 2012 / SCCM 2012 Migration - Change Driver Source Location

Back to Migration menu

Back to ConfigMgr 2012 menu


Previously in Pre-migration tasks we used the Coretech Package Source Changer to change the source location of our software packages. 

Note: This does not include the driver packages. (change the source location manually - typically there are not many). Also change the source location of the OS images manually.

Unfortunately this tool does not change the source location for individual drivers (and there are usually a lot - we do not want to have to manually do this).

Fortunately Chris Nackers has written an excellent script to do this (UpdateDriverSourcePath).


You can download it here

Chris Nackers Script



Extract the files



Edit the script and enter values for oldserver and newserver as shown here



 Copy the script to your Primary Site Server and execute in Powershell

cscript.exe UpdateDriverSourcePaths.wsf


 Script starts to run


Verify progress using the BDD.log file (C:\MININT\SMSOSD\OSDLOGS).


Check that the source locations have been changed.

10 comments:

  1. when i ran this script it only changed afew drivers source locations not all of them ? is there a specific patern it follows?

    ReplyDelete
    Replies
    1. No. It's pretty much what I've shown here. I use this script all the time.

      Delete
    2. ok, i am working in a lab so not a big deal but i still have been unable to figure this out, like i said before, i ran it and only changed most but not all.

      I ran this in powershell to get the source paths right after running the tool
      Get-CMDriver | select LocalizedDisplayName, ContentSourcePath, CI_ID | Export-Csv $home\documents\Drivers.csv

      I did a find and replace in notepad and have what i want in the csv but cannot import it back in.
      i have used the below command and others i have found online
      Import-Csv $home\documents\drivers.csv | %{Set-CMDriver -Id $_.CI_ID -DriverSource $_.ContentSourcePath}


      error says that it cannot validate the argument for 'Id'.
      Do you know what i could be doing wrong? i appreciate all the help
      I am running sccm 2012 R2 with the latests updates
      Thank you

      Delete
  2. Chris Nackers script works, but beaware that it's case sensitive when it comes to those paths.

    It uses VBS replace function that uses vbBinaryCompare by default, and that makes it case sensitive. To modify the script to case insensitive change this line:

    tmp = replace((objpkg.contentsourcepath), "oldserver", "newserver")

    to:

    tmp = replace((objpkg.contentsourcepath), "oldserver", "newserver", 1, -1, 1)

    ReplyDelete
  3. How to change path on same server : \\Server\path1 to \\Server\path2 ?

    ReplyDelete
    Replies
    1. You can't with this script. It's based on "OldServer" and "NewServer" and assumes that the share is the same.

      Delete
  4. Can´t download the script, I get http 500 error.

    ReplyDelete
    Replies
    1. I see the link seems to have been removed. That's a shame. Good script.

      Delete
    2. I contacted Chris. The script is available here

      http://www.chrisnackers.com/2011/08/12/configmgr-update-driver-source-paths-script/

      Delete
  5. I used this script and it updated all the paths. Since then my driver packs do not show any drivers in them. The driver pack is still on the share, and looks like it distributes but then if I validate the content it says it is not there.

    ReplyDelete