Skip to content

HenrysCat/Server-Shutdown-on-failed-ping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Server-Shutdown-on-failed-ping

A simple Powershell script to shutdown a server if another shuts down, e.g. one is connected to a UPS for safe shutdown and another is not.

This script is to be run on the second server and will ping the first server connected to the UPS, after 3 consecutive failed pings it will initiate a shutdown.

To run in Task Sheduler, select run with highest privileges and use the following (this assumes the script is in the root of C drive)

Program/script

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Add arguments (optional)

-ExecutionPolicy Bypass -file "C:\ShutdownServer2.ps1"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published