sccm2012-logoIn my series about my top 10 of new features in Configuration Manager 2012 SP1 I would like to dedicate this blog on the Powershell 3.0 support. I am not a Powershell expert but I will try to show you some tricks ๐Ÿ˜‰
When starting the Configuration Manager 2012 SP1 Console you need to click on the blue button in the upper left corner. In the pull down menu you will see the option to start Windows Powershell.

 

Click on โ€œConnect via Windows Powershellโ€ to start Windows Powershell with the Configuration Manager cmdlets.

Connect to Powershell

Connect to Powershell

Configuration Manager comes with loads of cmdlets, to show them execute the following command:
Get-command โ€“module ConfigurationManager |more

This will give you a list with all the 471 cmdlets that come with the Service Pack 1 of Configuration Manager 2012.

See your Configuration Manager cmdlets

See your Configuration Manager cmdlets

To show how this works you can try the following examples and see what happens. Just a couple of examples, if you want to have more indepth Powershell
Get information about you site with the following cmdlet: Get-Cmsite

Get information about the site

Get information about the site

 

If you want to connect to the site you can do this by using the the following commands.

  • Import-Module ($installdrive + “Program Files (x86)Microsoft Configuration ManagerAdminConsolebinConfigurationManager.psd1”)
  • or
  • Import-Module ($installdrive + “Program FilesMicrosoft Configuration ManagerAdminConsolebinConfigurationManager.psd1”)
  • next you need to connect to the Primary Site via: Set-Location PS1:

Tomorrow or the day after tomorrow I will post my first Powershell script that could be handy for (some of) you ๐Ÿ™‚

See the complete list of Cmdlets here

 

 

Comments