Quick code snippet to share with you guys for rebooting the full SharePoint farm. Invoke remote restart command to all peer machines with any valid SharePoint role, then reboot local machine last. NOTE – SQL not included but can be with adjusting the filter. Cheers.

Code
Add-PSSnapIn "Microsoft.SharePoint.PowerShell" $local = $env:COMPUTERNAME $localFQDN = $env:COMPUTERNAME + "." + $env:USERDNSDOMAIN $targets = Get-SPServer |? {$_.Role -ne "Invalid"} |? {$_.Address -ne $local -and $_.Address -ne $localFQDN} | Select Address $targets |% {Write-Host "Rebooting $($_)"; Restart-Computer $_ -Force} Restart-Computer -Force