locked
changing the data source location for drivers for SCCM migration RRS feed

  • Question

  • Im currently migrating data from SCCM 2007 to SCCM 2012 for a customer. I have managed to find tools to change data source locations for packages and driver packages, but not for the drivers. Currently the drivers have approximately 4 different content locations. The reason I need these paths changed is so we can more the paths to DFS shares.

    Is it possible to change the drivers content direcrlt via SQL or via a script?

    thanks

    Glen

    Friday, August 3, 2012 12:02 PM

Answers

All replies

  • Doing anything like this via SQL is bad joo-joos and completely unsupported.

    Here's how to do it via WMI and a script: http://www.chrisnackers.com/2011/08/12/configmgr-update-driver-source-paths-script/


    Jason | http://blog.configmgrftw.com

    Friday, August 3, 2012 1:39 PM
  • Hi Jason,

    thanks for the reply. I have looked at that script, however the script looks like it only changes the server name. I need for example \\Servername\oldfolder\drivers changed to \\newserver\newfolder\drivers.

    I'm not sure if the script changes just the server name or it can change both the server name and following folders. I didn't want to risk making changes in their production environment.

    Friday, August 3, 2012 10:28 PM
  • Yes, that's all *this* script does, but it is easy to modify to get the result you desire. The script simply updates the ContentSourcePath property of the SMS_DRIVER WMI object. For Chris's needs, he only needed to update the server but you can update the property however you need to.


    Jason | http://blog.configmgrftw.com


    Sunday, August 5, 2012 5:42 PM
  • hi! anyone got a copy of this they can upload? coretech always seems to be down for me :(

    http://blog.coretech.dk/jgs/coretech-package-source-changer-0-3-0-0/

    this seems like a massive time saver!

    Wednesday, August 8, 2012 5:13 AM
  • The download works fine for me. Have you tried again since posting this request?

    Jason | http://blog.configmgrftw.com

    Thursday, August 9, 2012 11:40 PM
  • I had the same situation where I was needing to replace the driver source paths during a migration, as I changed the folder structure on the new server. The script I used:

    param($ID = "*",$Site = "CEM") $drivers = Get-WmiObject SMS_Driver -Namespace root\SMS\site_$Site $drivers | where-object{$_.ContentSourcePath -like "\\oldserver\oldshare\olddriverpath\*"} | ForEach-Object{$_.ContentSourcePath = $_.ContentSourcePath -replace "oldserver\\oldshare\\olddriverpath", "newserver\newshare\newdriverpath"; $_.Put()}

    You will need to add your site code variable in the first line, or alternately remove the first line and replace $Site variable with your site code. Original source of script can be found here:  http://blog.coretech.dk/mip/small-useful-scriptschanging-driver-package-source-ps1/

    Make note: the old source path used in the -replace switch MUST include double backslashes between folders and NOT before the server name. i.e.

    \\server\share\path = wrong

    server\\share\\path = correct

    The original example includes them for the new destination path too, but I found it worked without them.

    Hope that helps!

    Cheers!

    • Proposed as answer by Brian Hampson Thursday, July 27, 2017 8:24 PM
    Thursday, October 18, 2012 1:04 AM
  • I'm reading this as all that is required is to edit the script with the Old server and new server names and then execute form a command prompt. Is that correct? 

    I have already changed the server in all of my packages, but realized that there are literally hundreds of drivers that need to be changed. Will this script error out on the entries I have already changed or will it just run and correct the drivers I haven't done yet?

    Thursday, August 22, 2013 8:40 PM
  • Not only will you need to change the server name, but also the path to where your drivers are stored, provided that you have keep the same folder structure on the new server. Then run the script via PowerShell.

    The script will loop through all the drivers but will only find and modify entries with the path that is specified in the $drivers variable (in bold):

    $drivers | where-object{$_.ContentSourcePath -like "\\oldserver\oldshare\olddriverpath\*"}

    If it can't match that path, it will skip and go to the next one. Unfortunately the script as it is will not display any errors or give any output, but you could modify it so that it does. The original source for the script can found in the link in my previous post.

    Cheers!

    Thursday, August 22, 2013 11:23 PM