SCCM Powershell module not importing

Biswajeet Kumar 121 Reputation points
2021-04-02T15:50:15.32+00:00

Hi,

I am trying to import sccm module to powershell using the cmdlets:

cd 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager'; 
Import-Module .\ConfigurationManager.psd1; CD ING:

'ING' is the site code. But its giving error "A drive with the name ING does not exist".

So I tried to create it by using

New-PSDrive -Name "ING" -PSProvider "AdminUI.PS.Provider\CMSite" -Root "contoso" -Description "Primary site"
CD ING:

But nothing happens, still gives the same error.

Thanks

Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2021-04-05T02:12:51.75+00:00

    Hi,

    Did the New-PSDrive cmdlet return the ING drive? You can list the drives using Get-PSDrive.

    You can also try "Connect via Windows Powershell" from the Configuration Manager console. It should set the location to the drive supported by the CMSite provider.

    84260-image.png

    Please refer to this link for more details
    https://learn.microsoft.com/en-us/powershell/sccm/overview?view=sccm-ps

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Biswajeet Kumar 121 Reputation points
    2021-04-05T03:59:51.057+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.