Skip to content

Instantly share code, notes, and snippets.

@Hashbrown777
Created May 15, 2023 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hashbrown777/a1641e4cfc91fee3d77d364235d564f1 to your computer and use it in GitHub Desktop.
Save Hashbrown777/a1641e4cfc91fee3d77d364235d564f1 to your computer and use it in GitHub Desktop.
Discharge laptop to 55% before shutting it down & not using it for a good while
while ((Get-CimInstance Win32_Battery).EstimatedChargeRemaining -gt 55) { sleep 60 } shutdown -s -t 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment