question

BiswajeetKumar-6788 avatar image
0 Votes"
BiswajeetKumar-6788 asked IanXue-MSFT commented

SCCM Powershell module not importing

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-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered IanXue-MSFT rolled back

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://docs.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.


image.png (57.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BiswajeetKumar-6788 avatar image
0 Votes"
BiswajeetKumar-6788 answered IanXue-MSFT commented
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for sharing the solution. Please "Accept Answer" to help other community members find it easier,

0 Votes 0 ·