DigitalDentist Posted July 9, 2017 Share Posted July 9, 2017 This will download and install or upgrade veeam and install a license if you have one, finally it will import a config file if one is available. I use Dropbox and a shared link. When using Dropbox be sure and change the zero at the end to 1 to download. You if course would have to update the dl links. Any questions let me know. VeeamInstall.ps1 ## $workdir = "c:\installer\" $LicenseFile = "$workdir\Veeamlicense.lic" $ConfigFile = "$workdir\config.xml" [Object[]]$List = @( New-Object -TypeName PSObject -Property @{"File" = "$workdir\Veeam2.exe"; "URL" = "https://www.dropbox.com/s/Veeamexedl=1"} New-Object -TypeName PSObject -Property @{"File" = $LicenseFile; "URL" = "https://www.dropbox.com/s/licensefile?dl=1"} New-Object -TypeName PSObject -Property @{"File" = $ConfigFile; "URL" = "https://www.dropbox.com/s/Configfiledl=1"} ) $VeeamInstallDir = "C:\Program Files\Veeam\Endpoint Backup" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir\ already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory } # Check if Invoke-Webrequest exists otherwise execute WebClient $List | ForEach-Object { if (Get-Command 'Invoke-Webrequest') { Invoke-WebRequest $_.URL -OutFile $_.File } else { $WebClient = New-Object System.Net.WebClient $webclient.DownloadFile($_.URL, $_.File) } } # Start the installation Start-Process -FilePath "$workdir\Veeam2.exe" -ArgumentList "/silent /accepteula" # Wait XX Seconds for the installation to finish Start-Sleep -s 45 #Stops Tray Process Stop-Process -Name "Veeam.EndPoint.Tray" -Force -ErrorAction SilentlyContinue #Imports License File Set-Location $VeeamInstallDir Start-Process Veeam.Agent.Configurator.exe -ArgumentList "-license /f:'$LicenseFile'" Start-Process Veeam.Agent.Configurator.exe -ArgumentList "-import /f:'$ConfigFile'" Start-Process "$VeeamInstallDir\Veeam.EndPoint.Tray.exe" Paul 1 Link to comment Share on other sites More sharing options...
BiofilmIT Posted February 23, 2018 Share Posted February 23, 2018 Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now