Skip to content

Load the Configuration Manager PowerShell Module

Load the Configuration Manager PowerShell Module

The Microsoft Configuration Manager console installs the PowerShell module used for site administration. Run these commands on a computer with the console installed and use the module path provided by the console installation.

Import the module

Import-Module "$($env:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1"

Connect to the site drive

After import, list available PowerShell drives:

Get-PSDrive -PSProvider CMSite

Then change to your site code drive, for example:

Set-Location ABC:

Troubleshooting

  • If SMS_ADMIN_UI_PATH is empty, confirm the Configuration Manager console is installed.
  • If the CMSite drive is missing, confirm the console can connect to the site and that your account has the required RBAC rights.
  • Use the PowerShell host/version supported by your installed Configuration Manager console.

Scripts should use named parameters and include error handling before being used for bulk changes.