First you must confirm that you want to reboot the computers with a Y/N prompt (or use the parameter), then you must type SHUTDOWN-ALL-COMPUTERS at the prompt before the computer list will be rebooted.

1. Download the script and call it RestartComputer.ps1.
2. From PowerShell navigate to the directory you saved the script in.
3. Type get-help .\RestartComputer.ps1 -full
3a. This will produce a full help file.

About the Author

Source Code

Important Note:
This script has not been checked by Spiceworks. Please understand the risks before using it.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

<#
.Synopsis
Simple script to reboot computers that requires you to confirm before it runs.
.Description
Simple script to reboot computers that requires you to confirm before it runs. Inspired
by a scripting problem here: http://community.spiceworks.com/topic/254089-bat-script-help-need-prompt-for-specific-input-to-continue
First you must confirm that you want to reboot the computers with a Y/N prompt (or use the parameter),
then you must type SHUTDOWN-ALL-COMPUTERS at the prompt before the computer list will be rebooted.
.Parameter Computers
An array of computer names. Default is set and can be modified by you.
.Parameter Confirm
Two factor confirmation before servers are rebooted. Confirm must be "Y" for the script to
proceed. If you do not put in the parameter the script will ask you.
.Parameter File
Path to a file that has a list of computer names in it. This will override -Computers. Computer
names should be one name per line.
.Example
.\RestartComputer.ps1
Will prompt for a confirmation, then do the hard confirm and then reboot the default computers
computer1, computer2 and computer3.
.Example
.\RestartComputer.ps1 -computers server1,server2,server3 -confirm y
Will do the hard confirm then reboot server1, server2 and server3.
.Example
.\RestartComputer.ps1 -file servers.txt
Will prompt you for a Y/N confirmation, then ask for the hard confirmation then reboot all computers
in the server.txt file.
.Link
http://community.spiceworks.com/topic/254089-bat-script-help-need-prompt-for-specific-input-to-continue
http://thesurlyadmin.com/2012/08/28/restart-computers-with-firm-confirmation/
#>
Param (
[Array]$Computers = @("computer1","computer2","computer3"),
[String]$Confirm = (Read-Host "Are you sure you want to reboot these servers (Y/N)?"),
[String]$File
)
If ($Confirm)
{ If ($Confirm.ToUpper() -eq "Y")
{ If ((Read-Host "Type SHUTDOWN-ALL-COMPUTERS") -eq "SHUTDOWN-ALL-COMPUTERS")
{ If ($File)
{ If (Test-Path $File)
{ $Computers = Get-Content $File
}
}
$Computers | ForEach { Restart-Computer -ComputerName $_ -whatif }
Write-Host "All computers have been restarted"
}
}
}

A vendor claims Ciscos hardware routers would out perform Sophos firewalls as gateway devices. Each vendor claims their stuff is superior. What do you think, is the hardware advantage enough to overcome the extra hop/processing cost?