SCCM 2012 R2 – Start Using PowerShell

Import-Module ConfigurationManager ? Nope, won’t work, at least not without jumping through a few hoops. Looking at the helpful red hints (I get lots of these!), the module is not found in the default path.

ps_cm1_e

From a PowerShell prompt, you need to change to the ….\bin directory, then import a .psd1. Using the -verbose shows the import progress, much better than staring at a screen, wondering what’s happening in the background 🙂

ps_cm2_e

Ready to go? Not quite. As you can see, we must now connect to the drive that represents the site, in this case, S01.

ps_cm3_e

Last thing to do, update the help file:

PS SO1:\>update-help -module configurationmanager

Adding the -module makes sure I only update the cm module, not all modules.

Now we can start using the new Cmdlts. Not too hard, just a bit fiddly. Good luck with the more than 470 cmdlts available.

Oh, and don’t forget, you need PowerShell 3.0 (or above) and the SCCM 2012 R2 console installed on the machine as well. Time for you to play!

get IT right

Wayne

Advertisements

1 Comment

Filed under SCCM 2012 R2, Server 2012 R2

One response to “SCCM 2012 R2 – Start Using PowerShell

  1. Pingback: Links from SCCM 2012 R2 10747 Course! | BNE MCT

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s