locked
Change de Driver Package Source Path RRS feed

  • Question

  • Hi,

    I'm in a SCCM 2007 to 2012 migration, and I'm having troubles changing the driver packages source path. According to this publication -> http://blogs.technet.com/b/cmpfekevin/archive/2013/04/05/configuration-manager-powershell-changing-package-source-location.aspx I already migrate software and drivers, but I'm missing the source path for driver packages.

    I'm running the following command to import the new source path using the import-csv:

    Import-csv $home\Desktop\drivers_pkg_new.csv | %{Set-CMDriverPackage -ID $_.PackageID -DriverPackageSource $_.PkgSourcePath}

    The bold parameter (DriverPackageSource) is not valid but I don't know the correct name for... anyone who already deal with this?.

     

    My csv file:
    #TYPE Selected.Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject
    "PackageID","PkgSourcePath"
    "MVU00016","\\domain.local\drivers$\packages\hpdc5700"
    "MVU00031","\\domain.local\drivers$\packages\hp5800"

     

    Thanks,

    -JP

    Tuesday, July 9, 2013 4:09 PM

All replies

  • 2 things here. Are you migrating to 2012 or 2012 SP1? The parameter is only applicable to SP1.

    Also, I have successfully used this following powershell script to change driver package source during an upgrade from 2007 R3 to 2012 SP1:  

    param($ID = "*",$Site = "TST")

    $drivers = Get-WmiObject SMS_DriverPackage -Namespace root\SMS\site_$Site

    $drivers | where-object{$_.PkgSourcePath -like "\\sccm2007\folder1\*"} |
    ForEach-Object{$_.PkgSourcePath = $_.PkgSourcePath -replace "sccm2007\\folder1", "sccm2012\folder2"; $_.Put()}


    Obviously replace the server name and folder name to match yours. Also run a test on 1 package first so you know that it works.

    Wednesday, July 10, 2013 8:54 PM
  • Thanks for your reply Peter.

    We're migrating from 2007 to SCCM 2012 SP1 CU2... I know that Powershell cmdlet is only available from SP1. In the error shown by the powershell console it states that the flag "-DriverPackageSource" doesn't exists, so I'm looking for the correct name for the driver package source path.

    Set-CMDriverPackage : A parameter cannot be found that matches parameter name 'DriverPackageSource'.
    At line:1 char:87
    + ... D $_.PackageID -DriverPackageSource $_.PkgSourcePath}
    +                    ~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Set-CMDriverPackage], ParameterBindingException
        + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.Osd.Commands.SetDriverPackageCommand

    The other script you're proposing I already tried to use it (long story).... as we have too may different driver package locations, I tried to run that script a few times standardizing a new unique driver packages location... It worked the firs time then it didn't...

    I first run something like:

    param($ID = "*",$Site = "TST")
    $drivers = Get-WmiObject SMS_DriverPackage -Namespace root\SMS\site_$Site
    $drivers | where-object{$_.PkgSourcePath -like "\\sccm2007\"} |
    ForEach-Object{$_.PkgSourcePath = $_.PkgSourcePath -replace "sccm2007", "sccm2012"; $_.Put()}

    Then...

    param($ID = "*",$Site = "TST")
    $drivers = Get-WmiObject SMS_DriverPackage -Namespace root\SMS\site_$Site
    $drivers | where-object{$_.PkgSourcePath -like "\\sccm2012\"} |
    ForEach-Object{$_.PkgSourcePath = $_.PkgSourcePath -replace "folder1\\XXX", "sccm2012\drivers$\packages"; $_.Put()}

    And so on... but it only worked the first time, so now at least have all packages pointing to SCCM2012 but not to the right folder.

     


    • Edited by JPMuniz Thursday, July 11, 2013 5:35 PM typo
    Thursday, July 11, 2013 5:35 PM
  • Looking at the example post you gave, the powershell differs from yours.

    Import-CSV C:\Users\administrator.corp\Documents\packages.csv | %{Set-CMPackage -id $_.PackageID -Path $_.PkgSourcePath}

    The example shows "-Path" and not "-DriverPackageSource" as you are using. Could this be your problem?

    Monday, July 15, 2013 10:23 AM
  • Thanks Peter... I already tried that and many other posible flags like "DriverPackagePath", "DriverPkgPath", "DriverPkgSource", "PackagePath", "PkgPath", etc...

    I don't know how search for the available flags... maybe I can find the right flag that way.

    Monday, July 15, 2013 3:05 PM
  • Try this link for info on your possible flags if you haven't already figured this one out.

    http://technet.microsoft.com/en-us/library/jj870912.aspx

    Wednesday, July 24, 2013 9:01 PM