IIS Reset on all SP Servers using PowerShell

This script will list all SP Servers and restarts IIS on all of them.

add-PSSnapin microsoft.sharepoint.powershell
$spserver = get-spserver | ?{$_.role -eq "Application"}
foreach ($server in $spserver)
{
    write-host "Performing IIS Reset on Server:"$server.name
    iisreset $server.Name
}

Comments

Popular posts from this blog

"There's a configuration problem preventing us from getting your document. If possible, try opening this document in Microsoft Word." Office WebApp Error

"We’re sorry. We ran into a problem completing your request. Please try that again in few minutes." Excel Service SharePoint

Deployment error "The web.config is invalid on this IIS Web Site"