PowerShell and ConfigMgr – List ConfigMgr cmdlets

Now that you’ve learned how to prepare your environment, let’s view all the cmdlets that are currently available for ConfigMgr. From your PowerShell prompt (that already has the ConfigMgr module imported), type the following:

get-command -module ConfigurationManager | out-gridview

This will display all cmdlets in the ConfigurationManager module. As of this writing (ConfigMgr 2012 SP1 Beta) there are 338 cmdlets. Here’s an example for how to get the current count:

get-command -module ConfigurationManager | measure-object

Notice the verb-noun pair for each cmdlet. By using this standard practice, Powershell enables you to 1) think, 2) type, 3) do. The goal is for the admin to use standard verbs to be able to easily leverage PowerShell with different products. (Review the approved verbs for Windows PowerShell). Type get-cm and then press [tab] multiple times to enumerate the ConfigMgr cmdlets. You can also type get-cmmanagementpoint and press [tab] multiple times to display all get commands for ConfigMgr Management Points.

Greg

About Greg Ramsey
Greg Ramsey is a systems engineer specializing in global systems management for Dell IT. He has a B.S. in Computer Sciences and Engineering from the Ohio State University and is a Microsoft Most Valuable Professional (MVP) for Microsoft System Center Configuration Manager. Greg coauthored SMS 2003 Recipes: A Problem-Solution Approach (Apress, 2006), Microsoft System Center Configuration Manager Unleashed (Sams, 2009), Microsoft System Center 2012 Configuration Manager Unleashed (Sams, 2012), and Microsoft System Center 2012 Configuration Manager: Administration Cookbook (Packt Publishing, 2012), and Microsoft System Center 2012 Configuration Manager R2 Unleashed (Sams, 2012). Greg is cofounder of the Ohio SMS Users Group, and the Central Texas Systems Management User Group.

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

%d bloggers like this: