Monday, July 21, 2014

IISRESET on All Servers in the SharePoint Farm

If you ever need to perform IISRESET on all servers in the SharePoint farm, Doing IISReset on Server Farm with Multiple SharePoint servers is a painful processes. Here is a nifty solution to do IISRESET on all SharePoint Servers using PowerShell:

	#Get All SharePoint Servers - Except DB and SMTP Servers
	$Servers = Get-SPServer | Where {$_.Role -ne "Invalid" }

	#Iterate through the list and restart one by one.
    foreach ($server in $servers)  
       Write-Host "Restarting IIS on server: $server"  
       IISRESET $server.Address /noforce  
	   #Get the Status
       Write-Host "IIS status for server $($server):"  
       IISRESET $server.Address /status
Make sure, you have "Local Administrator" Permission on all servers you want to reset IIS.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...