[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

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.
0
gacus
Asked:
gacus
  • 3
1 Solution
 
gacusAuthor 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....
0
 
gacusAuthor Commented:
SCCM version 5.0.7958.1303
0
 
gacusAuthor Commented:
This was a confirmed bug my MS.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now