-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set High Performance Power Settings on Host #141
Comments
Once xPowerPlan is merged into xComputerManagement this should be simple to implement. |
Have you done anything with this one @iainbrighton? I see xPowerPlan was added to xComputerManagement in version 1.9.0.0. I can run with this one if you like, but wonder if you have any thoughts about the implementation. I assume we should ad a "PowerPlan" setting to the LabHostDefault config, but what should the default value be? We could default to "high performance" as default value, but for one I am not sure if that is what most people would prefer, and second I assume that plan goes by another name on non-english OS'es, so not sure how that would work out in that case. So my suggestion would be to default to a $null or "default" value, and only change the setting if people actively specify a power plan name (we could help people select the right name by making a dynamic -PowerPlan parameter). However defaulting to a value that does not change anything, would not help with you (or other people) forgetting to set it 😉 Thoughts? |
... and I assume depending on xPowerPlan for this means bundling xComputerManagement with Lability? |
@csandfeld No - I've not done anything yet. We would need to bundle the xComputerManagement but that's not really an issue. I think the later/latest releases use the plan guid to avoid the localisation issue. I do agree that we probably don't want to enable high performance by default. If that's the case, then perhaps we can just warn when loading the module that it's not set?! Thoughts? |
Well if we are talking about this one it filters on the ElementName property of the Win32_PowerPlan instances, so the GUID will not work. For a LabHostDefault config parameter, would you prefer a switch param to toggle enforcement of the "high performance" plan, or an option to specify any plan name? Warning about high performance plan not set would work as well -guess we could do both? |
Hi @csandfeld, my gut feel is just stick to the built-in "High Performance". We don't want to get into creating power plans - I only configure it on desktop/server devices and leave my laptop as "Balanced". If we need a version of xPowerPlan that will work with GUIDs we'll need to contribute that enhancement into the upstream repo before bundling it with Lability. Maybe we should open an issue there? We can certainly add a warning when loading the module if it's not set in the mean time. That would stop me forgetting to set it 😛. |
I should have been more clear - I didn't mean to suggest that we start creating power plans, but rather that we could create a config option that could take the name of any existing power plan, and apply that. Illustrating with parameters it could either be a string param that would have to match an existing power plan: [String]$PowerPlanName ... or a switch param that would specify whether or not to apply High performance power plan [Switch]$EnableHighPerformancePowerPlan If we go with the latter, we should be able to just lookup of the name of the high performance with something like $powerPlanName = Get-CimInstance -Namespace root\cimv2\power -ClassName Win32_PowerPlan |
Where-Object { $_.InstanceID -eq 'Microsoft:PowerPlan\{8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c}' } |
Select-Object -ExpandProperty ElementName and use that when we create the config for the xPowerPlan resource. Thoughts? |
I see that an issue is already open for the xPowerPlan resource to use GUIDs. |
We need an option to set the "High Performance" power setting on the Lability host. I always forget to do this and it makes things noticeably quicker 😃!
The text was updated successfully, but these errors were encountered: