Is there an equivalent in powershellto
powercfg -requests
listing the processes preventing the sleeping ?
Thanks
I found this article.
The function that you are searching for should be:
powercfg /requests