Show Collection Details in ConfigMgr 2012 via PowerShell – Part 4: The Power Management Settings

PoweManeSettThis week another addition to my series about showing the Collection Details, of a device, via a PowerShell form. This week I added another new tab, with more new information! This new tab show all the information about the applied Power Management settings, that affect the device. It’s also good to know that within the Power Management settings, there is an option Never apply power management settings to computers in this collection and when this option is selected the form will show a row with five times Never. So whenever a device shows a row like that, the other Power Management settings aren’t applicable anymore.

Collection Details Form

This script creates a nice form to show Collection Details of the specified device. At this moment it shows all of the following information about the collections (of which the device is a member):

  • Tab – Deployments
    • The Name of the Collections, of which the device is a member. 
    • The Name of the targeted Deployments.
    • The State of the targeted Deployments.
    • The Type of the targeted Deployments.
  • Tab – Variables
    • The Name of the Collections, of which the device is a member. 
    • The Name of the Collection Variable.
    • The Value of the Collection Variable.
    • The Type of the Variable (for now only Collection Variable).
  • Tab – Maintenance Windows
    • The Name of the Collections, of which the device is a member. 
    • The Name of the Maintenance Window.
    • The Start Time of the Maintenance Window.
    • The Duration of the Maintenance Window.
    • The Recurrence of the Maintenance Window.
    • The Schedule of the Maintenance Window.
    • The Type of the Maintenance Window (including the, in R2, new type, for Software Updates).
    • Whether the Maintenance Window is enabled or not.
  • ShowCollDeta08(NEW!) Tab – Power Management
    • (NEW!) The Name of the Collections, of which the device is a member. 
    • (NEW!) The Name of the applied Non-Peak Power Plan.
    • (NEW!) The Name of the applied Peak Power Plan.
    • (NEW!) The Start Time of the applied Peak Power Plan.
    • (NEW!) The End Time of the applied Peak Power Plan.
    • (NEW!) The Wake-up Time of the devices in the Collection.

Note: When there is there is no targeted Deployment, no Deployment State (like with Client Settings), no Collection Variable, no Maintenance Window, or no Power Plan then the empty field(s) will show a star (*).

Power Plan

The tool will only show the name of the applied Power Management settings. In case there is a need for more information, then it’s good to know that it’s stored in a XML form (like the example under here). For an example of how to work with XML in PowerShell, take a look at an older post here.

<?xml version="1.0" encoding="utf-16"?> <PowerScheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" GUID="22B698A7-B734-4107-B5E0-4BD16375F5C2" Name="Balanced (ConfigMgr)" Description="Automatically balances performance with energy consumption on capable hardware (ConfigMgr)"> <PowerSettings> <PowerSetting> <GUID>3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e</GUID> <CurrentACPowerSettingIndex>1200</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>600</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>29f6c1db-86da-48c5-9fdb-f2b67b1f44da</GUID> <CurrentACPowerSettingIndex>3600</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>900</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>0e796bdb-100d-47d6-a2d5-f7d2daa51f51</GUID> <CurrentACPowerSettingIndex>1</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>1</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>7648efa3-dd9c-4e3e-b566-50f929386280</GUID> <CurrentACPowerSettingIndex>1</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>1</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>a7066653-8d6c-40a8-910e-a1f54b84c7e5</GUID> <CurrentACPowerSettingIndex>0</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>0</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>96996bc0-ad50-47ec-923b-6f41874dd9eb</GUID> <CurrentACPowerSettingIndex>1</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>1</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>5ca83367-6e45-459f-a27b-476b1d01c936</GUID> <CurrentACPowerSettingIndex>1</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>1</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>6738e2c4-e8a5-4a42-b16a-e040e769756e</GUID> <CurrentACPowerSettingIndex>1200</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>300</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>9d7815a6-7ee4-497e-8888-515a05f02364</GUID> <CurrentACPowerSettingIndex>0</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>0</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>d8742dcb-3e6a-4b3c-b3fe-374623cdcf06</GUID> <CurrentACPowerSettingIndex>0</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>0</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>637ea02f-bbcb-4015-8e2c-a1c7b9c0b546</GUID> <CurrentACPowerSettingIndex>0</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>2</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>81cd32e0-7833-44f3-8737-7081f38d1f70</GUID> <CurrentACPowerSettingIndex>0</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>0</CurrentDCPowerSettingIndex> </PowerSetting> <PowerSetting> <GUID>bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d</GUID> <CurrentACPowerSettingIndex>1</CurrentACPowerSettingIndex> <CurrentDCPowerSettingIndex>1</CurrentDCPowerSettingIndex> </PowerSetting> </PowerSettings> </PowerScheme>

Usage

This script can be used, either ‘standalone’, or as a right-click option. The command line usage is like this PowerShell.exe -ExecutionPolicy ByPass .\ShowCollectionDetails_v0_8p.ps1 -ResourceId <ResourceId> -SiteCode <SiteCode> -SiteServer <SiteServer>. To see how to use this as a right-click option, have a look at my previous post.

Availability

As of now this new version of my Collection Details Form is publicly available via the TechNet Galleries. Please let me know what you think of the form and what else you would like to see in it.