I'm trying to enforce a limit of 5 minutes for display and sleep settings on Windows 11 Home using PowerShell. I've set idle timeouts successfully with `powercfg`, but I want to ensure that users can only set the times lower than this limit but not exceed it. Specifically, I need to cap the following:
- Turn off display after (`VIDEOIDLE`)
- Sleep after (`STANDBYIDLE`)
- Hibernate after (`HIBERNATEIDLE`)
Additionally, if possible, I'd like to include console lock display-off (`VIDEOCONLOCK`). The challenge is that this is for Windows 11 Home, so there's no domain GPO or AppLocker options available. Users have mixed AC and DC devices, and I've handled the browser keep-awake scenario, but I need help with this hard limit on sleep settings. Any PowerShell solutions that can enforce this maximum and persist even after changes would be appreciated!
4 Answers
Funny how this post looks like it was generated by a bot looking for help. But really, the best way to implement what you're trying to achieve is to use GPO or upgrade to a Pro version. That way, you can set the policies centrally, which would be a lot easier than doing it manually.
Honestly, why are you using Windows Home in a work setting? It's not really suitable for that environment. But if you're set on this, just know it’ll be a challenge to do it with PowerShell alone. Users might find a way to change the settings back, especially if they have local admin rights. If it's such a big deal, maybe consider using group policy instead. It's not really user-friendly to enforce a 5-minute timeout; you'll likely annoy your users and trust could be affected. It's better to go longer, like an hour, and explain why those settings are important.
You might have to consider a workaround since a strict cap like you want isn't really feasible without a constant monitoring script. This script would need to reset the settings if they go beyond the limit, but that's going to be a bit of a hassle.
Thanks for the tip! I'll explore that option.
To really lock this down, the solutions are limited. Either you run a PowerShell script in a loop that keeps enforcing the settings, or simply upgrade to Windows Pro or Enterprise and leverage GPO, which is way more straightforward given your needs.
I totally agree! If users keep needing to reset the timeouts, maybe it’s a sign that you need to rethink the approach. Communication about the necessity might make them more understanding.