added new function Get-AbsoluteURI

This commit is contained in:
2023-01-04 10:42:37 -05:00
parent fe2e50e456
commit 7094ff6f8e
+6
View File
@@ -789,5 +789,11 @@ Function ZeroPad-Decimal {
Return $splitNumbers[0] + '.' + $paddedDecimal 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-MSPDirectories
Setup-LogFile Setup-LogFile