Link to home
Start Free TrialLog in
Avatar of gacus
gacus

asked on

Import-CMDriver fails with "Import-CMDriver : Invalid object path "

I am attempting to use Import-CMDriver cmdlet for SCCM 2012 R2 but it fails with:

"Import-CMDriver : Invalid object path "

I can see that it is adding the driver to the catalog, but it is failing to add it to the package and I can't figure out why.  I have tried with different inf files and deleted and created different packages.  It just doesn't work.  Here is the command that I am running.  I don't see any reason why it wouldn't work.

 Set-Location abc:
   
    foreach($iniFile in $infFilesToDeploy){
        $cmDrivePackage = Get-CMDriverPackage -Name "PackageName"
        $cmDriverCat = Get-CMCategory -CategoryType "DriverCategories" -Name "PackageName"
        $cmDrivePackage
        $iniFile
        Import-CMDriver -UncFileLocation $iniFile -ImportDuplicateDriverOption AppendCategory -AdministrativeCategory $cmDriverCat -EnableAndAllowInstall $True -DriverPackage $cmDrivePackage -UpdateDistributionPointsforDriverPackage $false
       
    }
As I said, it is seeing the ini file since it it importing it into the catalog.  It just won't add it to the package.  It also leaves the package in a locked state if I try to modify it after I run this command.

Anyone have any ideas why this command doesn't function?

I even tested without adding to a package:

Import-CMDriver -UncFileLocation "\\abe\drivers$\test\Display.Driver\nv_disp.inf"

I get the same error message about invalid object path.  It still adds the driver to the driver catalog, but displays this error message.  Seems like a bug here.  Anyone else able to add drivers using this cmdlet?

I am running this on Windows 8.1.  I also tried it on the SCCM server running Server 2012 and I get the same error.

Thank you for your time.
Avatar of gacus
gacus

ASKER

If I enable -verbose, I can see this WQL query is failing:

VERBOSE: Executing WQL query: Select CTC.CI_ID,CTC.ContentID From SMS_CIToContent As CTC Join SMS_Driver As DR On
DR.CI_ID=CTC.CI_ID Where DR.CI_ID=XXXXXX


Seems to be a bug....
Avatar of gacus

ASKER

SCCM version 5.0.7958.1303
ASKER CERTIFIED SOLUTION
Avatar of gacus
gacus

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial