Automatic TeamViewer Download for Customers

Have you ever spent 20 minutes trying to explain how to download Teamviewer to a customer or family member? Well thankfully, we have a solution for this!

I found 2 scripts that will do this; The first script is for Powershell 2.0, and the second script is for Powershell 3.0. In order to automate this even more, I decided to make an if statement that checks to see which version of Powershell you are running. Once the script figures out your version, it executes the commands that are compatabile with your system. Thank you PowershellAdmin.com for the 2 helpful scripts and I hope you enjoy my modified version!

Script:

if ($PSVersionTable.psversion.major -lt 3) { 

$Destination = "$Env:Temp\TeamViewerQS_en.exe";
$WebClient = New-Object -TypeName System.Net.WebClient;
#$StreamsDestination = "$Env:Temp\streams-from-sysinternals.exe";
$WebClient.DownloadFile("http://download.teamviewer.com/download/TeamViewerQS_en.exe", $Destination);
#$WebClient.DownloadFile('https://live.sysinternals.com/tools/streams.exe', $StreamsDestination);
#& $StreamsDestination /accepteula -d $Destination;
Start-Process -FilePath $Destination

} else {

$Destination = "$Env:Temp\TeamViewerQS_en.exe";
Invoke-WebRequest -Uri "http://download.teamviewer.com/download/TeamViewerQS_en.exe" -OutFile $Destination;
Unblock-File -Path $Destination;
Start-Process $Destination
}

The original scripts can be found here.

1 Comment

  1. Nice .. that will make like easier 🙂

Leave a Reply