{"id":19954024,"url":"https://github.com/mkht/dscr_powerplan","last_synced_at":"2026-03-17T12:39:31.621Z","repository":{"id":57670244,"uuid":"93294218","full_name":"mkht/DSCR_PowerPlan","owner":"mkht","description":"PowerShell DSC Resource for Power Plan configuration","archived":false,"fork":false,"pushed_at":"2019-04-20T12:52:37.000Z","size":52,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T08:01:23.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkht.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-04T06:15:34.000Z","updated_at":"2024-05-19T11:34:35.000Z","dependencies_parsed_at":"2022-09-26T20:40:35.092Z","dependency_job_id":null,"html_url":"https://github.com/mkht/DSCR_PowerPlan","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkht%2FDSCR_PowerPlan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkht%2FDSCR_PowerPlan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkht%2FDSCR_PowerPlan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkht%2FDSCR_PowerPlan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkht","download_url":"https://codeload.github.com/mkht/DSCR_PowerPlan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252242047,"owners_count":21717096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T01:18:36.318Z","updated_at":"2026-03-17T12:39:31.593Z","avatar_url":"https://github.com/mkht.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"DSCR_PowerPlan\r\n====\r\n\r\nPowerShell DSC Resource \u0026 Functions for Power Plan configuration\r\n\r\n## Install\r\nYou can install Resource through [PowerShell Gallery](https://www.powershellgallery.com/packages/DSCR_PowerPlan/).\r\n```Powershell\r\nInstall-Module -Name DSCR_PowerPlan\r\n```\r\n\r\n## DSC Resources\r\n* **cPowerPlan**\r\nPowerShell DSC Resource for create / change / remove Power Plan.\r\n\r\n* **cPowerPlanSettings**\r\nPowerShell DSC Resource for modify Power settings \u0026 options.\r\n\r\n## Properties\r\n\r\n### cPowerPlan\r\n+ [String] **Ensure** (Write):\r\n    + Specifies existence state of Power Plan.\r\n    + The default value is `Present`. { `Present` | `Absent` }\r\n\r\n+ [String] **Name** (Required):\r\n    + The Name of Power Plan.\r\n\r\n+ [String] **Description** (Write):\r\n    + The Description of Power Plan.\r\n\r\n+ [String] **GUID** (Key):\r\n    + The GUID of Power Plan.\r\n    + If you want to create Original Plan, should specify unique GUID.\r\n    + If you want to set system default Plans, you can use aliases. {`SCHEME_MAX` | `SCHEME_MIN` | `SCHEME_BALANCED`}\r\n\r\n+ [Boolean] **Active** (Write):\r\n    + Specifies set or unset Power Plan as Active.\r\n    + The default value is `$false`\r\n\r\n### cPowerPlanSettings\r\n+ [String] **SettingGuid** (Key):\r\n    + The GUID of Power Setting.\r\n    + You can obtain GUIDs by executing `powercfg.exe /Q` command\r\n    + You can also use some aliases. The list of aliases is [here](https://github.com/mkht/DSCR_PowerPlan/blob/master/DSCResources/cPowerPlanSetting/DATA/GUID_LIST_SETTING).\r\n\r\n+ [String] **PlanGuid** (Key):\r\n    + The GUID of target Power Plan.\r\n    + You can also use aliases. {`ACTIVE` | `ALL` | `SCHEME_MAX` | `SCHEME_MIN` | `SCHEME_BALANCED`}\r\n    + If you specify the alias `ALL`, All Power Plans on the current system to be targeted.\r\n\r\n+ [String] **AcDc** (Key):\r\n    + You can choose {`AC` | `DC` | `Both`}\r\n\r\n+ [UInt32] **Value** (Required):\r\n    + Specifies Power Setting value.\r\n\r\n\r\n## Examples\r\n### cPowerPlan\r\n+ **Example 1**: Set \"Balanced\" Power Plan to Active\r\n```Powershell\r\nConfiguration Example1\r\n{\r\n    Import-DscResource -ModuleName DSCR_PowerPlan\r\n    cPowerPlan Balanced_Active\r\n    {\r\n        Ensure = \"Present\"\r\n        GUID   = \"SCHEME_BALANCED\"   # You can use alias\r\n        Name   = \"Balanced\"\r\n        Active  = $true\r\n    }\r\n}\r\n```\r\n\r\n+ **Example 2**: Create original Power Plan \"PlanA\"\r\n```Powershell\r\nConfiguration Example2\r\n{\r\n    Import-DscResource -ModuleName DSCR_PowerPlan\r\n    cPowerPlan PlanA\r\n    {\r\n        Ensure = \"Present\"\r\n        GUID   = \"ad98b5c7-06a1-493f-b611-da04c574e8b5\"   # Unique GUID\r\n        Name   = \"PlanA\"\r\n        Description = \"This is original Power Plan\"\r\n    }\r\n}\r\n```\r\n\r\n### cPowerPlanSettings\r\n+ **Example 1**: Set the duration of entering sleep to 5 minutes.\r\n```Powershell\r\nConfiguration Example1\r\n{\r\n    Import-DscResource -ModuleName DSCR_PowerPlan\r\n    cPowerPlanSetting Sleep_5Min\r\n    {\r\n        PlanGuid    = 'ACTIVE'\r\n        SettingGuid = 'STANDBYIDLE'\r\n        Value       = 300   #sec\r\n        AcDc        = 'Both'\r\n    }\r\n}\r\n```\r\n----\r\n## Functions\r\nYou can use some functions to set Power Plan\r\n### Get-PowerPlan\r\nGet Power Plans on the current system.\r\n```PowerShell\r\nPS C:\\\u003e Get-PowerPlan -GUID 'ACTIVE'\r\nCaption        :\r\nDescription    : Automatically balances performance with...\r\nElementName    : Balanced\r\nInstanceID     : Microsoft:PowerPlan\\{381b4222-f694-41f0-9685-ff5bb260df2e}\r\nIsActive       : True\r\nPSComputerName :\r\n```\r\n### Get-PowerPlanSetting\r\nGet specified settings of Power Plan.\r\n```PowerShell\r\nPS C:\\\u003e Get-PowerPlanSetting -PlanGuid 'ACTIVE' -SettingGuid 'PBUTTONACTION'\r\nName                           Value\r\n----                           -----\r\nSettingGuid                    7648efa3-dd9c-4e3e-b566-50f929386280\r\nDCValue                        3\r\nACValue                        3\r\nPlanGuid                       381b4222-f694-41f0-9685-ff5bb260df2e\r\n```\r\n\r\n### Set-PowerPlanSetting\r\nSet specified settings of Power Plan.\r\n```PowerShell\r\nPS C:\\\u003e Set-PowerPlanSetting -PlanGuid 'ACTIVE' -SettingGuid 'LIDACTION' -Value 1 -AcDc 'Both'\r\n```\r\n----\r\n## ChangeLog\r\n### Unreleased\r\n+ Fix PSSA issues\r\n\r\n### 1.3.0\r\n+ Support new aliases in Windows 10 version 1809 (`PERFEPP1` / `ADVANCEDCOLORQUALITYBIAS`)\r\n+ Add `-All` switch in `Get-PowerPlan`\r\n+ Minor fixes\r\n\r\n### 1.2.0\r\n+ Support new aliases in Windows 10 version 1803\r\n\r\n### 1.1.1\r\n+ bug fix [#6](https://github.com/mkht/DSCR_PowerPlan/issues/6)\r\n\r\n### 1.1.0\r\n+ Support to set all power plans at once in `cPowerPlanSetting` (see [example](Example/))\r\n+ Support hidden aliases in `cPowerPlanSetting`\r\n+ Support new aliases in Windows 10 Fall Creators Update\r\n+ Several useful functions are now available (`Get-PowerPlan`, `Get-PowerPlanSetting`, `Set-PowerPlanSetting`)\r\n\r\n### 1.0.0\r\n+ Add \"Description\" property for cPowerPLan\r\n+ bug fix\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkht%2Fdscr_powerplan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkht%2Fdscr_powerplan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkht%2Fdscr_powerplan/lists"}