-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from silversword411/main
New Community Script: Reboot
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<# | ||
.SYNOPSIS | ||
Reboots/Restarts the computer with an optional wait time before restarting. Max wait 24hrs | ||
.DESCRIPTION | ||
This script restarts the computer forcefully. | ||
.PARAMETER Wait | ||
Specifies the number of seconds to wait before restarting the computer. | ||
.EXAMPLE | ||
-Wait 60 | ||
Waits for 60 seconds and then restarts the computer. | ||
.NOTES | ||
v1.0 5/17/2024 Created by silversword411 and dinger1986 | ||
#> | ||
|
||
param( | ||
[int]$Wait | ||
) | ||
|
||
if ($Wait) { | ||
shutdown -r -t $Wait | ||
} | ||
else { | ||
Restart-Computer -Force | ||
} |