Compare commits

..
4 Commits
Author SHA1 Message Date
dyoder 7094ff6f8e added new function Get-AbsoluteURI 2023-01-04 10:42:37 -05:00
dyoder fe2e50e456 added new function Get-AbsoluteURI 2023-01-04 10:42:02 -05:00
dyoder e39606cd1b update download urls 2023-01-04 10:41:35 -05:00
dyoder 6bfc18a15f minor fix 2023-01-04 10:41:10 -05:00
4 changed files with 18 additions and 10 deletions
+4 -4
View File
@@ -3,10 +3,10 @@ If (! $Edition ) { $Edition = 'desktop' }
# Set the correct download URL and agent edition # Set the correct download URL and agent edition
switch ( $Edition.ToLower() ) { switch ( $Edition.ToLower() ) {
'server' { $URL = $ECB_WIN_URL; $AgentEdition = 'baremetal' } 'server' { $AgentEdition = 'baremetal' }
'desktop' { $URL = $ECB_WIN_URL; $AgentEdition = 'desktop' } 'desktop' { $AgentEdition = 'desktop' }
'vm' { $URL = $ECB_VMM_URL; $AgentEdition = 'vmedition' } 'vm' { $AgentEdition = 'vmedition' }
default { $URL = $ECB_WIN_URL; $AgentEdition = 'desktop' } default { $AgentEdition = 'desktop' }
} }
# Install and import additional Powershell module # Install and import additional Powershell module
+5 -3
View File
@@ -1,15 +1,17 @@
. 'C:\Users\dyoder\Documents\Emberkom\Data\Projects\development\management-scripts\Tools.ps1'
## Define URL for downloading the installer ## 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 ## Make sure the URL is valid before we do anything
If ( IsURLValid $URL ) If ( IsURLValid $URL )
{ {
## Set the local file name to download to ## Set the local file name to download to
$FILE = '{0}{1}' -f (GetTempPath),(Split-Path $URL -Leaf) $FILE = '{0}{1}' -f (GetTempPath),(Split-Path $URL -Leaf)
write-output $FILE
## Download installer ## Download installer
Download-File -URL $URL -File $FILE #Download-File -URL $URL -File $FILE
## Install package ## Install package
Start-Process $FILE #Start-Process $FILE
} }
+2 -2
View File
@@ -2,10 +2,10 @@
If (! $Edition ) { $Edition = 'desktop' } If (! $Edition ) { $Edition = 'desktop' }
# Specify URL to "Backup for Windows" agent installer # Specify URL to "Backup for Windows" agent installer
$ECB_WIN_URL = 'https://s3.amazonaws.com/cb_setups/MBS/53CFB286-7A97-4FDF-8CFA-475C0DB63A9A/Brands/FB8308E2-448A-4645-A5F6-A3632A7E57F4/EmberkomCloudBackup_v7.8.1.350_ALLEDITIONS_Setup.exe' $ECB_WIN_URL = 'https://s3.amazonaws.com/cb_setups/MBS/53CFB286-7A97-4FDF-8CFA-475C0DB63A9A/Brands/FB8308E2-448A-4645-A5F6-A3632A7E57F4/EmberkomCloudBackup_v7.8.2.252_ALLEDITIONS_Setup.exe'
# Specify URL to "Backup Virtual Machine Edition" agent installer # Specify URL to "Backup Virtual Machine Edition" agent installer
$ECB_VMM_URL = 'https://s3.amazonaws.com/cb_setups/MBS/53CFB286-7A97-4FDF-8CFA-475C0DB63A9A/Brands/FB8308E2-448A-4645-A5F6-A3632A7E57F4/EmberkomCloudBackup_v7.8.1.350_VMWARE_Setup.exe' $ECB_VMM_URL = 'https://s3.amazonaws.com/cb_setups/MBS/53CFB286-7A97-4FDF-8CFA-475C0DB63A9A/Brands/FB8308E2-448A-4645-A5F6-A3632A7E57F4/EmberkomCloudBackup_v7.8.2.252_VMWARE_Setup.exe'
# Set the correct download URL and agent edition # Set the correct download URL and agent edition
switch ( $Edition.ToLower() ) { switch ( $Edition.ToLower() ) {
+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