added new function Get-AbsoluteURI

This commit is contained in:
2023-01-04 10:42:02 -05:00
parent e39606cd1b
commit fe2e50e456
+6 -4
View File
@@ -1,15 +1,17 @@
. 'C:\Users\dyoder\Documents\Emberkom\Data\Projects\development\management-scripts\Tools.ps1'
## Define URL for downloading the installer
$URL = 'https://efulfillment.autodesk.com/NetSWDLD/2020/DTCONN/2FF3C1A4-14EC-3C6D-B127-47327638CC14/SFX/Autodesk_Desktop_Connector_15_5_0_1684_Win_64bit.sfx.exe'
$URL = Get-AbsoluteURI -URL 'https://www.autodesk.com/adsk-connect-64?'
## Make sure the URL is valid before we do anything
If ( IsURLValid $URL )
{
## Set the local file name to download to
$FILE = '{0}{1}' -f (GetTempPath),(Split-Path $URL -Leaf)
write-output $FILE
## Download installer
Download-File -URL $URL -File $FILE
#Download-File -URL $URL -File $FILE
## Install package
Start-Process $FILE
}
#Start-Process $FILE
}