As mentioned in my previous post (using the WMI feature of the tool) we have recently released a new tool – the Coretech WMI and PowerShell Explorer. For information about downloading and installing the tool checkout this blog post from Kaido Järvemets. 

The second main feature of the Coretech WMI and PowerShell Explorer is the PowerShell module. The intention with this module is to help you get started with Microsoft PowerShell and especially System Center 2012 Configuration Manager SP1 and PowerShell. The feature can be used to import custom PowerShell modules as well as built-in PowerShell modules. Once imported you can use the feature to easily see all the cmdlets in the module and navigate in the help topics. When working the built-in System Center 2012 SP1 Configuration Manager module; you will also be able to connect to www.cm12sdk.net and get access to hundreds of real life examples.

 

www.cm12sdk.net is a public library packaged with hundreds of simple and advanced PowerShell examples. The library is maintained by Kaido Järvements, a Microsoft Enterprise Client Management MVP working @Coretech as consultant and trainer.

How to import Configuration Manager 2012 PowerShell module

  1. Launch the Coretech WMI and PowerShell Explorer as Administrator.
  2. Select Modules tab.
  3. Click Browse and select the ConfigurationManager.psd1 file. The PowerShell module is part of the Configuration Manager administrator console installation and is stored in c:\Programs Files(x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1 or <ConfigMgr server install dir>\AdminConsole\bin\ConfigurationManager.psd1

    image

  4. Back in the Coretech WMI and PowerShell Explorer click Import.

    image

  5. During the Import process you might be presented with an error dialog complaining about PowerShell not being supported in 64-bit version. You can safely ignore that error by clicking OK.

    image

  6. Click Get Modules to load the imported modules.
  7. All loaded modules will be listed in the Select Module dropdown list. From the Select Module dropdown list click ConfigurationManager.

    image

  8. From the Command dropdown list you’ll be presented with all the cmdlets in the ConfigurationManager module.

    image

  9. Select the New-CMApplication cmdlet to view the help topics for the cmdlet.
  10. Now you should see the selected command help topics.

    image

  11. In the right hand-side select Download Code example from CM12 SDK. You’ll now see one or more code examples that can be used in Configuration Manager 2012.

    image

  12. Copy the example text and launch PowerShell from the Configuration Manager Administrator console.

    image

  13. In PowerShell type (or paste) the code example from CM12 SDK to create the application.

    image

  14. The application is now created in Configuration Manager.

    image

Happy PowerShelling