On your
day-to-day activity as a SharePoint Administrator, you always need to monitor
web sites, application pools in your SharePoint farm. Especially after the
application deployments, I see there are many times, these websites and
application pools got stopped in many servers and you need to login to each and
every server and verify them and start them.
Here I have developed the below scripts where you do
not need to login to each server, you just need to login to any one server in a
farm and execute the below scripts which will remotely verify the websites,
application pools and show you the results. There is also a possibility to
start them if anything is stopped in any server in the farm.
Especially if
you have a large SharePoint farm with multiple WFE servers, it will be very
helpful to manage from one server. You do not need to login each server and
manage them. You can save a lot of time!
Additionally there are two scripts to restart IIS and
SharePoint services in the whole farm.
Steps to follow:
Login to any
server in Farm - > Copy the attached zip file and extract it -> Open
SharePoint 2010 Management Shell -> Execute the below ps1 files.
Note: You will find Sam.Functions.ps1 file which contains
below functions definitions.
Get all the Application Pools which are
stopped in the SharePoint 2010 Farm
.\Sam.GetAppPoolStatusOnFarm.ps1
Start the Application Pools which are
stopped in the SharePoint 2010 Farm
.\Sam.StartStoppedAppPoolOnFarm.ps1
Get all the web sites which are stopped in
the SharePoint 2010 Farm
.\Sam.GetWebsitesStatusOnFarm.Ps1
Start all the web sites
which are stopped in the Farm(If Default web site is stopped in a server,
then it will skip that server)
.\Sam.StartStoppedWebSitesOnFarm.ps1
Restart IIS in all servers in the
SharePoint 2010 farm
.\Sam.RestartIISOnFarm.ps1
Restart SharePoint services in all servers
in a SharePoint 2010 farm
.\Sam.RestartSharePointServicesOnFarm.ps1
Note: For
start/restart scripts, it will ask to you confirm(yes/no) in powershell window
before it execute. So that you can take a decision before execute them.
Hope you like
it!
Please find attached zip file containing all script files.
New Features in SharePoint Site Monitoring Tool V2.0
Test a SharePoint site from selected WFE servers.
Test a SharePoint site with Server Load Balancing(in case of multiple WFE servers).
Test a SharePoint site and verify the test properties. Please see below for test properties.
Test a SharePoint site and export the test properties.
Test a SharePoint site and get the SharePoint GUID which helps in finding detailed information from SharePoint ULS log.
Use auto-generated Merge-SPLogFile Command(from test properties) to run directly in SharePoint farm to get the test specific logs(merge log file).
Use the same merge log file to get the execution time of each function using Log Parser Command(from detailed properties) which may help is finding the actual root cause of the application performance.
Browse a SharePoint site from a specific WFE server to verify the source(html/text) in Text View Tab.
Browse a SharePoint site from a specific WFE server to verify the UI in Browse Tab.