Introduction

If you want to use the Powershell CMDlets for managing your SCCM environment, you will find that they are not available by default on your client.

This blog post covers how to import the Powershell module for MEMCM (SCCM).

What is the Powershell module in MEMCM (SCCM)?

The Powershell module for MEMCM (SCCM) contains a number of CMDlets, which lets you to manage your environment through Powershell.

If you wish to create scripts to automate your daily tasks, the Powershell CMDlets are a must.

How to import the MEMCM (SCCM) Powershell module

In order to use the Powershell CMDlets, you need to import the Configuration Manager Powershell module.

Run this command from an elevated Powershell prompt on the server where SCCM is installed.

Import-Module (Join-Path $(Split-Path $env:SMS_ADMIN_UI_PATH) ConfigurationManager.psd1)

How to run cmdlets from the MEMCM (SCCM) Powershell module

Once you have imported the module in Powershell, you will need to set the location to the Powershell drive of the MEMCM (SCCM) site server.

The easiest way to do this is by running the below commands, either manually or in a script:

    $SiteCode = Get-PSDrive -PSProvider CMSITE
    Set-Location -Path "$($SiteCode.Name):\"

How to start Powershell from the MEMCM (SCCM) Console

Another alternative that you can use is to run Powershell from the MEMCM console.

Press the down arrow and Connect via Windows Powershell.

Once the Powershell window is open, it will automatically set the location to the MEMCM (SCCM) site.

Conclusion

Using Powershell to manage MEMCM (SCCM) is a must in most cases. When doing anything in bulk, it is simply not possible to use the console.

I hope this blog post was informative to you. Please leave any suggestions for improvements in the comments section.

Thanks!

Suggested Resources

Related Posts

Subscribe to newsletter:

If you want to receive the latest news for MEMCM, Windows 10, and Powershell, please subscribe to my monthly newsletter!

5 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here