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!"
     }
 }
Show more

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

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name Get.URLStatusCode

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy 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

Owners

Copyright

Copyright © 2020 RePass Cloud Pty Ltd

Package Details

Author(s)

  • Danijel-James Wynyard

Tags

http url uri statuscode status 200 code https

Functions

Get-URLStatusCode

Dependencies

This module has no dependencies.

Release Notes

Initial release to PSModule.

FileList

Version History

Version Downloads Last updated
2.1.4.39 (current version) 280 8/2/2020
2.0.2.30 18 8/2/2020
2.0.2.29 47 7/27/2020
2.0.2.24 18 7/27/2020