We help IT Professionals succeed at work.

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

265 Views
Last Modified: 2015-01-30
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.
Comment
Watch Question

Author

Commented:
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....

Author

Commented:
SCCM version 5.0.7958.1303
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.