From 7094ff6f8eaa087f3e655f11399978b7399ae723 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Wed, 4 Jan 2023 10:42:37 -0500 Subject: [PATCH] added new function Get-AbsoluteURI --- Tools.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tools.ps1 b/Tools.ps1 index 9b167f1..b2dd152 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -789,5 +789,11 @@ Function ZeroPad-Decimal { Return $splitNumbers[0] + '.' + $paddedDecimal } +# Function to follow a URL and return the absolute URI of the result (whether redirected or not) +Function Get-AbsoluteURI { + param([string]$URL) + Return [System.Net.HttpWebRequest]::Create($URL).GetResponse().ResponseUri.AbsoluteUri +} + Setup-MSPDirectories Setup-LogFile \ No newline at end of file