SharePoint Farm Reboot
Below script will help you to reboot all servers in SharePoint Farm.
asnp
"*sharepoint*"
$servers =
Get-SPServer | ?{$_.Role -ne "Invalid"}
foreach ($server in
$servers)
{
$servername = $server.Address
Write-output "Executing on :
$server" -ForegroundColor Yellow
if($env:COMPUTERNAME -ne $servername)
{
Write-output
$servername
SHUTDOWN
/r /f /t 0 /m \\$servername
}
}
SHUTDOWN /r /f /t 0 /m \\$env:COMPUTERNAME
Comments
Post a Comment