May 31, 2018 · How-To

Connecting to SCCM Using PowerShell

You can connect to an SCCM site server using PowerShell, but doing it without accessing the Configuration Manager Console on your computer is a bit tricky (remember, the point is to avoid GUIs). Again, the Microsoft documentation omits a crucial step.

To connect using the PowerShell module for SCCM successfully, do the following from the computer that has the Configuration Manager Console installed:

  1. Right-click the Windows PowerShell icon and choose "Run as administrator".
  2. Type CD 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin' and hit enter.
  3. Type Import-Module .\ConfigurationManager.psd1 and run it.
  4. Here's the crucial missing step. Enter New-PSDrive -Name [yoursitecode] -PSProvider "AdminUI.PS.Provider\CMSite" -Root "[your SCCM server's FQDN]" -Description "SCCM Site"
  5. Now we can connect to the site. Enter CD ABC:, where ABC is your site code. The colon is necessary!

Now you should be all set to begin running SCCM cmdlets.