Created
June 14, 2017 22:10
-
-
Save raspi/045612870efad8d69b2a47279efa49a7 to your computer and use it in GitHub Desktop.
List Windows advanced power settings as MarkDown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # List Windows advanced power settings as MarkDown | |
| # Use: | |
| # this-script.ps1 | Out-File power.md | |
| # Use powercfg to show hidden settings: | |
| # powercfg -attributes <Group GUID> <GUID> -ATTRIB_HIDE | |
| # example: | |
| # powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 06cadf0e-64ed-448a-8927-ce7bf90eb35d -ATTRIB_HIDE | |
| # (c) Pekka "raspi" Järvinen 2017- | |
| $powerSettingSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingSubgroup | Where-Object {$_.ElementName -ne $null} | |
| $powerSettingInSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingInSubgroup | |
| $powerSettingTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSetting | |
| $powerSettingDefinitionPossibleValueTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingDefinitionPossibleValue | |
| $powerSettingDefinitionRangeDataTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingDefinitionRangeData | |
| $powerSettingSubgroubTable | foreach { | |
| $gname = $_.ElementName | |
| $gdescr = $_.Description | |
| $tmp = $_.InstanceId | |
| $tmp = $tmp.Remove(0, $tmp.LastIndexOf('{') + 1) | |
| $tmp = $tmp.Remove($tmp.LastIndexOf('}')) | |
| $gguid = $tmp | |
| Write-Output ('# {0}' -f $gname) | |
| Write-Output ('{0}' -f $gdescr) | |
| Write-Output ('Group GUID: `{0}`' -f $gguid) | |
| Write-Output "" | |
| $settings = $powerSettingInSubgroubTable | Where-Object GroupComponent -Match "$gguid" | |
| $settings | foreach { | |
| $tmp = $_.PartComponent | |
| $tmp = $tmp.Remove(0, $tmp.LastIndexOf('{') + 1) | |
| $tmp = $tmp.Remove($tmp.LastIndexOf('}')) | |
| $guid = $tmp | |
| $s = $powerSettingTable -Match "$guid" | |
| Write-Output ('* {0}' -f $s.ElementName) | |
| Write-Output (' * GUID: `{0}`' -f $guid) | |
| if ($s.Description) { | |
| Write-Output (' * {0}' -f $s.Description) | |
| } | |
| $possible = ($powerSettingDefinitionPossibleValueTable | Where-Object InstanceId -Match "$guid" | select -ExpandProperty ElementName) -join ", " | |
| if ($possible) { | |
| Write-Output (' * Possible values: {0}' -f $possible) | |
| } | |
| $units = $powerSettingDefinitionRangeDataTable | Where-Object InstanceId -Match "$guid" | |
| if ($units) | |
| { | |
| $u = $units[0].Description | |
| $tmp = @() | |
| $units | foreach { | |
| $tmp += '{0}: {1} {2}' -f $_.ElementName, $_.SettingValue, $u | |
| } | |
| Write-Output (' * {0}' -f ($tmp -join " | ")) | |
| } | |
| } | |
| } |
Author
WTF M$ WHY ARE THESE HIDDEN AND UNDOCUMENTED ?!!??!?!
F U SATYA
Any idea about what does this do?
User Presence Prediction mode
GUID: 82011705-fb95-4d46-8d35-4042b1d20def
Specify User Presence Prediction mode for your computer
Possible values: Disabled, Enabled
By the way, you may be interested in GUI PowerSettingsExplorer - the app allows edit Power settings including hiddens
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example output:
Hard disk
Specify power management settings for your hard disk.
Group GUID:
0012ee47-9041-4b5d-9b77-535fba8b14420b2d69d7-a2a1-449c-9680-f91c70521c6051dea550-bb38-4bc4-991b-eacf37be5ec86738e2c4-e8a5-4a42-b16a-e040e769756e80e3c60e-bb94-4ad8-bbe0-0d3195efc663d639518a-e56d-4345-8af2-b9f32fb26109dab60367-53fe-4fbc-825e-521d069d2456fc95af4d-40e7-4b6d-835a-56d131dbc80eInternet Explorer
Specify Internet Explorer power management settings.
Group GUID:
02f815b5-a5cf-4c84-bf20-649d1f75d3d84c793e7d-a264-42e1-87d3-7a0d2f523ccdDesktop background settings
Change power management settings for your desktop background.
Group GUID:
0d7dbae2-4294-402a-ba8e-26777e8488cd309dce9b-bef4-4119-9921-a851fb12f0f4Wireless Adapter Settings
Configure wireless adapter power settings.
Group GUID:
19cbb8fa-5279-450e-9fac-8a3d5fedd0c112bbebe6-58d6-4636-95bb-3217ef867c1aSleep
Specify sleep settings.
Group GUID:
238c9fa8-0aad-41ed-83f4-97be242c8f2025dfa149-5dd1-4736-b5ab-e8a37b5b818729f6c1db-86da-48c5-9fdb-f2b67b1f44da7bc4a2f9-d8fc-4469-b07b-33eb785aaca094ac6d29-73ce-41a6-809f-6363ba21b47e9d7815a6-7ee4-497e-8888-515a05f02364a4b195f5-8225-47d8-8012-9d41369786e2abfc2519-3608-4c2a-94ea-171b0ed546abbd3b718a-0680-4d9d-8ab2-e1d2b4ac806dd4c1d4c8-d5cc-43d3-b83e-fc51215cb04dUSB settings
Specify USB power settings for the USB hub driver
Group GUID:
2a737441-1930-4402-8d77-b2bebba308a30853a681-27c8-4100-a2fd-82013e97068348e6b7a6-50f5-4782-a5d4-53bb8f07e226498c044a-201b-4631-a522-5c744ed4e678d4e98f31-5ffe-4ce1-be31-1b38b384c009Idle Resiliency
Idle resiliency settings.
Group GUID:
2e601130-5351-4d9d-8e04-252966bad0543166bc41-7e98-4e03-b34e-ec0f5f2b218ec36f0eb4-2988-4a70-8eee-0884fc2c2433c42b79aa-aa3a-484b-a98f-2cf32aa90a28d502f7ee-1dc7-4efd-a55d-f04b6f5c0545Interrupt Steering Settings
Interrupt Steering Settings
Group GUID:
48672f38-7a9a-4bb2-8bf8-3d85be19de4e2bfc24f9-5ea2-4801-8213-3dbae01aa39d73cde64d-d720-4bb2-a860-c755afe77ef2d6ba4903-386f-4c2c-8adb-5c21b3328d25Power buttons and lid
Specify what your computer does when you close the lid and press the power buttons.
Group GUID:
4f971e89-eebd-4455-a8de-9e59040e73475ca83367-6e45-459f-a27b-476b1d01c9367648efa3-dd9c-4e3e-b566-50f929386280833a6b62-dfa4-46d1-82f8-e09e34d029d696996bc0-ad50-47ec-923b-6f41874dd9eb99ff10e7-23b1-4c07-a9d1-5c3206d741b4a7066653-8d6c-40a8-910e-a1f54b84c7e5PCI Express
PCI Express Power Management Settings
Group GUID:
501a4d13-42af-4429-9fd1-a8218c268e20ee12f906-d277-404b-b6da-e5fa1a576df5Processor power management
Specify power management settings for your computer’s processor.
Group GUID:
54533251-82be-4824-96c1-47b60b740d0006cadf0e-64ed-448a-8927-ce7bf90eb35d06cadf0e-64ed-448a-8927-ce7bf90eb35e0cc5b647-c1df-4637-891a-dec35c3185830cc5b647-c1df-4637-891a-dec35c31858412a0ab44-fe28-4fa9-b3bd-4b64f44960a612a0ab44-fe28-4fa9-b3bd-4b64f44960a71facfc65-a930-4bc5-9f38-504ec097bbc02430ab6f-a520-44a2-9601-f7f23b5134b12ddd5a84-5a71-437e-912a-db0b8c78873236687f9e-e3a5-4dbf-b1dc-15eb381c68633b04d4fd-1cc7-4f23-ab1c-d1337819c4bb4009efa7-e72d-4cba-9edf-91084ea8cbc340fbefc7-2e9d-4d25-a185-0cfd8574bac640fbefc7-2e9d-4d25-a185-0cfd8574bac7447235c7-6a8d-4cc0-8e24-9eaf70b96e2b447235c7-6a8d-4cc0-8e24-9eaf70b96e2c45bcc044-d885-43e2-8605-ee0ec6e96b59465e1f50-b610-473a-ab58-00d1077dc418465e1f50-b610-473a-ab58-00d1077dc4194b92d758-5a24-4851-a470-815d78aee1194bdaf4e9-d103-46d7-a5f0-6280121616ef4d2b0152-7d5c-498b-88e2-34345392a2c54e4450b3-6179-4e91-b8f1-5bb9938f81a15d76a2ca-e8c0-402f-a133-2158492d58ad616cdaa5-695e-4545-97ad-97dc2d1bdd88616cdaa5-695e-4545-97ad-97dc2d1bdd89619b7505-003b-4e82-b7a6-4dd29c300971619b7505-003b-4e82-b7a6-4dd29c3009726c2993b0-8f48-481f-bcc6-00dd2742aa0671021b41-c749-4d21-be74-a00f335d582b75b0ae3f-bce0-45a7-8c89-c9611c25e10075b0ae3f-bce0-45a7-8c89-c9611c25e1017b224883-b3cc-4d79-819f-8374152cbe7c7d24baa7-0b84-480f-840c-1b0743c00f5f7d24baa7-0b84-480f-840c-1b0743c00f607f2492b6-60b1-45e5-ae55-773f8cd5caec7f2f5cfa-f10c-4823-b5e1-e93ae85f46b5893dee8e-2bef-41e0-89c6-b55d0929964c893dee8e-2bef-41e0-89c6-b55d0929964d8baa4a8a-14c6-4451-8e8b-14bdbd197537943c8cb6-6f93-4227-ad87-e9a3feec08d194d3a615-a899-4ac5-ae2b-e4d8f634367f984cf492-3bed-4488-a8f9-4286c97bf5aa984cf492-3bed-4488-a8f9-4286c97bf5ab9943e905-9a30-4ec1-9b99-44dd3b76f7a2b000397d-9b0b-483d-98c9-692a6060cfbfbc5038f7-23e0-4960-96da-33abaf5935ecbc5038f7-23e0-4960-96da-33abaf5935edbe337238-0d82-4146-a960-4f3749d470c7c4581c31-89ab-4597-8e2b-9c9cab440e6bc7be0679-2817-4d69-9d02-519a537ed0c6cfeda3d0-7697-4566-a922-a9086cd49dfad8edeb9b-95cf-4f95-a73c-b061973693c8d8edeb9b-95cf-4f95-a73c-b061973693c9dfd10d17-d5eb-45dd-877a-9a34ddd15c82e0007330-f589-42ed-a401-5ddb10e785d3ea062031-0e34-4ff1-9b6d-eb1059334028ea062031-0e34-4ff1-9b6d-eb1059334029f735a673-2066-4f80-a0c5-ddee0cf1bf5df8861c27-95e7-475c-865b-13c0cb3f9d6bfddc842b-8364-4edc-94cf-c17f60de1c80Display
Specify power management settings for your display.
Group GUID:
7516b95f-f776-4464-8c53-06167f40cc9917aaa29b-8b43-4b94-aafe-35f64daaf1ee3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e89cc76a4-f226-4d4b-a040-6e9a1da9b8828ec4b3a5-6868-48c2-be75-4f3044be88a790959d22-d6a1-49b9-af93-bce885ad335ba9ceb8da-cd46-44fb-a98b-02af69de4623aded5e82-b909-4619-9949-f5d71dac0bcbaded5e82-b909-4619-9949-f5d71dac0bccf1fbfde2-a960-4165-9f88-50667911ce96fbd9aa66-9553-4097-ba44-ed6e9d65eab8Presence Aware Power Behavior
Presence Aware Power Behavior Settings
Group GUID:
8619b916-e004-4dd8-9b66-dae86f806698468fe7e5-1158-46ec-88bc-5b96c9e44fd049cb11a5-56e2-4afb-9d38-3df47872e21b5adbbfbc-074e-4da1-ba38-db8b36b2c8f360c07fe1-0556-45cf-9903-d56e3221024282011705-fb95-4d46-8d35-4042b1d20def9fe527be-1b70-48da-930d-7bcf17b44990c763ee92-71e8-4127-84eb-f6ed043a3e3dMultimedia settings
Configure power settings for when devices and computers are playing media from your computer.
Group GUID:
9596fb26-9850-41fd-ac3e-f7c3c00afd4b03680956-93bc-4294-bba6-4e0f09bb717f10778347-1370-4ee0-8bbd-33bdacaade4934c7b99f-9a6d-4b3c-8dc7-b6693b78cef4Energy Saver settings
Energy Saver settings.
Group GUID:
de830923-a562-41af-a086-e3a2c6bad2da13d09884-f74e-474a-a852-b6bde8ad03a85c5bb349-ad29-4ee2-9d0b-2b25270f7a81e69653ca-cf7f-4f05-aa73-cb833fa90ad4Battery
Configure notification and alarm settings for your battery.
Group GUID:
e73a048d-bf27-4f12-9731-8b2076e8891f637ea02f-bbcb-4015-8e2c-a1c7b9c0b5468183ba9a-e910-48da-8769-14ae6dc1170a9a66d8d7-4ff7-4ef9-b5a2-5a326ca2a469bcded951-187b-4d05-bccc-f7e51960c258d8742dcb-3e6a-4b3c-b3fe-374623cdcf06f3c5027d-cd16-4930-aa6b-90db844a8f00