Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

Checking Website Up Status using PowerShell

Overview

This script can be used to query a list of sites and produce an HTML report of their status. I created this script in order to get a report of SharePoint sites that my team manage without having to check the site one by one to see if they are up or not.

Download

https://github.com/junecastillote/Get-WebUpStatus

How to use

Modify the configuration file


  • enableDebug (1 = ON, blank = OFF)
    • Enable or disable the transcript logging
  • sendEmail (1 = ON, blank = OFF)
    • Enable of disable sending of the report via email
  • alertsOnly (1 = ON, blank = OFF)
    • Indicates whether the report will only be sent if there are errors
  • mailFrom
    • mail sender address
  • mailTo
    • mail recipient addresses. multiple addresses can be separated by comma
  • mailServerName
    • IP address, hostname or FQDN of the smtp relay server
  • mailServerPort
    • SMTP server port to use. Normally this does not need changing, unless your SMTP server is listening on a different port.
  • sitesListFile
    • this indicates the location of the text file containing the list of sites to query

Run the script

Syntax: .\Get-WebUpStatus.ps1 -configFile


Output

The HTML file report will be created inside the same folder where the script is located



And if the sendEmail parameter is turned on, the same HTML content will be sent via email



Use as Scheduled Task

If you plan to use the script with Task Scheduler, here's a sample reference.



Program/script: 
powershell
Arguments: 
-command C:\Get-WebUpStatus\Get-WebUpStatus.ps1 -configFile C:\Get-WebUpStatus\config.xml

End of Post

Please report issues in the Github repository.
Share:

Delete Files Based on Age using PowerShell

UPDATE: This script has been discontinued. The new version of the script is published here - 
PowerShell Script to Delete Files By Age with Email Summary Report

Share:

IIS SMTP Server Status Check using PowerShell

This script can be used to check and report the status of the Smtp Service and the Virtual SMTP Server created in IIS. For use with Windows 2008+


Sample Report Output





----------------------------

Download 

You can download the script from here:


  • Version 1.1 (GitHub)
    • Removed Local Queue Counter
    • Removed Remote Queue Counter
    • Added Queue, Pickup, Drop and BadMail counter
    • Fixed some formatting issues
    • Replaced CSS Color theme (if you prefer the old theme, just copy the $css_string variable from the older version.
    • Some code optimization
  • Version 1.0 (GitHub)
    • Initial version

To run, no parameters required, just execute the script from PowerShell.


The Variables

Make sure to edit the following variables to conform to your environment or requirements





Share:

Popular Posts

Powered by Blogger.