Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Community Script: Reboot #235

Merged
merged 4 commits into from
Jun 4, 2024
Merged

Conversation

silversword411
Copy link
Contributor

No description provided.

@silversword411 silversword411 requested a review from dinger1986 May 21, 2024 05:41
@silversword411
Copy link
Contributor Author

Please merge if this looks good thx!

@dinger1986
Copy link
Contributor

testwait

Doesnt work for me, changed afew things but not passing $Wait correctly

@silversword411
Copy link
Contributor Author

A 120 second wait on a 90 second killed script definitely won't work 😂

Probably need to update timeout to 12hrs or something crazy or agent is going to kill it while ps is waiting.

@dinger1986
Copy link
Contributor

changed timeout to 300 seconds and wait to 120 seconds and still get the same

@silversword411
Copy link
Contributor Author

ChatGPT failed me... -wait on Restart-Computer also requires other flags.
Let's just ps sleep x and then run it....with an expanded script timeout.

Actually tested this time.

@dinger1986
Copy link
Contributor

Id just do it

param(
    [int]$Wait
)

if ($Wait) {
    shutdown -r -t $Wait
}
else {
    Restart-Computer -Force
}

@silversword411
Copy link
Contributor Author

Id just do it

Works for me! :)

@silversword411 silversword411 merged commit 8ee1fe4 into amidaware:main Jun 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants