ConfigMgr PowerShell Module – Package

You ever need the PowerShell Module for ConfigMgr but don’t want to install the full Console? Why? Who knows, I’m not asking you if you don’t ask me.

While this isn’t probably isn’t 100% accurate, and includes some extra files, it’s a pain in the bum to figure out exactly which files are needed. I spent some time, and slowly kept adding file types until it worked…

I wrote a script that you can run on a machine that has the MEMCM Console Installed, and it will gather the files and place them into the UNC path of your choosing. From there you can then make a package with those contents. When you’re done you have a folder with 340 files in it (as of CM 1910) and weighs in around 103MB.

Script in action populating the Folder
Copied Folder to another machine without MEMCM Console and was able to import the Module

In this image, I copied the folder down to a location machine and then was able to import the Module.

At this point, you can package up the contents and use it in a Task Sequence, or copy it to another machine… whatever floats your boat.

I’m currently using it for my OSD Builder Task Sequence.

Script: https://github.com/gwblok/garytown/blob/master/CreateCMPowerShellModulePackage.ps1

GARYTOWN

2 thoughts on “ConfigMgr PowerShell Module – Package”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.