From a8538a7e95df972c18cafd46e40f7517e2a5be02 Mon Sep 17 00:00:00 2001 From: David Rudduck <47308254+davidrudduck@users.noreply.github.com> Date: Mon, 3 May 2021 11:29:48 +1000 Subject: [PATCH] Update Win_ScreenConnectAIO.ps1 added support for `-company {{client.name}} -site {{site.name}}` command line arguments. This results in ScreenConnect adding those fields to the agent so it's easier to filter down. --- scripts/Win_ScreenConnectAIO.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/Win_ScreenConnectAIO.ps1 b/scripts/Win_ScreenConnectAIO.ps1 index a727df8e..4c5db1a8 100644 --- a/scripts/Win_ScreenConnectAIO.ps1 +++ b/scripts/Win_ScreenConnectAIO.ps1 @@ -1,7 +1,7 @@ <# -Requires global variables for serviceName "ScreenConnectService" and url "ScreenConnectInstaller"' +Requires global variables for serviceName "ScreenConnectService" and url "ScreenConnectInstaller" serviceName is the name of the ScreenConnect Service once it is installed EG: "ScreenConnect Client (1327465grctq84yrtocq)" -url is the path the download the exe version of the ScreenConnect Access installer' +url is the path the download the exe version of the ScreenConnect Access installer Both variables values must start and end with " (Prior to TRMM Version 0.6.5), remove / don't use " on TRMM Version 0.6.5 or later. Also accepts uninstall variable to remove the installed instance if required. #> @@ -9,7 +9,9 @@ Also accepts uninstall variable to remove the installed instance if required. param ( [string] $serviceName, [string] $url, - [string] $action + [string] $action, + [string] $company, + [string] $site ) $ErrorCount = 0 @@ -82,7 +84,7 @@ if ($action -eq "uninstall") { { $start_time = Get-Date $wc = New-Object System.Net.WebClient - $wc.DownloadFile("$url", "$OutPath\$output") + $wc.DownloadFile("$url&c=$company&c=$site", "$OutPath\$output") Start-Process -FilePath $OutPath\$output -Wait Write-Output "Time taken to download and install: $((Get-Date).Subtract($start_time).Seconds) second(s)" exit 0