mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-09 06:20:25 +01:00
Update hibernate.ps1
This commit is contained in:
parent
4376aa3405
commit
82d8ad6d84
@ -2,9 +2,10 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Hibernates the computer
|
Hibernates the computer
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script enables hibernate mode for the local computer immediately.
|
This PowerShell script hibernates the local computer immediately.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./hibernate
|
PS> ./hibernate.ps1
|
||||||
|
😴💤 Good night, I'm going to sleep deep...
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -12,7 +13,7 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
try {
|
try {
|
||||||
"Bye bye."
|
Write-Host "😴💤 Good night, I'm going to sleep deep..."
|
||||||
& rundll32.exe powrprof.dll,SetSuspendState 1,1,0 # bHibernate,bForce,bWakeupEventsDisabled
|
& rundll32.exe powrprof.dll,SetSuspendState 1,1,0 # bHibernate,bForce,bWakeupEventsDisabled
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user