Powershell script for SCCM package module is not working

Question

Dear Friends, we are creating package via Powershell script but this script is not running for only one user rest of them its working even the user has full rights to SCCM server, , the below error message is showing when the one user tried to create the package via Powershell module

Error Message is:

New-CMPackage : The ‘New-CMPackage’ command was found in the module ‘ConfigurationManager’, but the module could not be loaded. For more information, run ‘Import-Module
ConfigurationManager’.
At C:Program FilesWindowsPowerShellModulesPkgModulefunctionPkgModulefunction.psm1:40 char:1
+ New-CMPackage –Name $Pkgname –Description $Description –Language English –Manufa …
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-CMPackage:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

solved 0
Siva Raj 4 months 3 Answers 102 views Beginner 0

Answers ( 3 )

  1. Hi,

    Please share the powershell script error to assist.

    Thanks
    Karthikeyan

  2. Hello Siva, Had you tried to import module by running powershell as administrator.

    + https://snipboard.io/4SW8PJ.jpg

    If you already tried, Please provide the more details with screenshots by hiding sensitive info, How are you executing!

    Best answer
  3. First thing what I do is :

    1. Launch the SCCM console. In the upper-left corner, there’s a blue rectangle. Select the white arrow in the blue rectangle, and “choose Connect via Windows PowerShell”.
    2. Check whether that user can see the following prompt – HMD is your side code
    “PS HMD:>”

    Or you can try following

    Import-Module ConfigurationManager command is working for that user?

    If so, try to run the following command

    Get-CMSite

    to check whether the connectivity is ok or not?

Leave an answer

Sorry, you do not have a permission to answer to this question .