Get.URLStatusCode

2.1.4.39

PowerShell Module that will return the HTTP Status Code of any provided URL without the need for a Try/Catch statement.

Example 1 - Return HTTP Status Code of given url:
 Get-URLStatusCode -Url https://www.google.com/

Example 2 - Switch statement using HTTP Status Code:
 Switch (Get-URLStatusCode -Url https://www.google.com/) {
     200 {
         Write-Output "
PowerShell Module that will return the HTTP Status Code of any provided URL without the need for a Try/Catch statement.

Example 1 - Return HTTP Status Code of given url:
 Get-URLStatusCode -Url https://www.google.com/

Example 2 - Switch statement using HTTP Status Code:
 Switch (Get-URLStatusCode -Url https://www.google.com/) {
     200 {
         Write-Output "Website is up and reachable!"
     }
     Default {
         Write-Output "Website is not reachable or down!"
     }
 }

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name Get.URLStatusCode

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deloy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Author(s)

Danijel-James Wynyard

Copyright

Copyright © 2020 RePass Cloud Pty Ltd

Owners

Tags

http url uri statuscode status 200 code https

Functions

Get-URLStatusCode

Dependencies

This module has no dependencies.

Release Notes

Initial release to PSModule.

Version History

Version Downloads Last updated
2.1.4.39 (current version) 28 8/2/2020
2.0.2.30 3 8/2/2020
2.0.2.29 32 7/27/2020
2.0.2.24 3 7/27/2020