How to get the Sleep Setting and set new Sleep Setting for System from PowerShell?

Anant Bera 151 Reputation points
2024-05-30T18:39:08.3466667+00:00

Hey Experts,

We are looking for a PowerShell command to get the current sleep time interval from the system and set a new time interval for the system. Currently, we have four sleep settings in the system, and we want all the settings to be retrieved and set to the new time interval.

Below is the screenshot for the System settings

Thanks

User's image

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,552 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.