From 98a11a3645d1a931de54813fc13d06c9d2be6a0d Mon Sep 17 00:00:00 2001 From: Samuel Meuchel Date: Tue, 6 Jul 2021 11:25:17 -0500 Subject: [PATCH 1/3] add this exclusion for your ScreenConnect Deployment script to work. --- docs/docs/install_agent.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/install_agent.md b/docs/docs/install_agent.md index a2878ca6..5fc72d2d 100644 --- a/docs/docs/install_agent.md +++ b/docs/docs/install_agent.md @@ -9,6 +9,7 @@ `C:\Program Files\Mesh Agent\*`
`C:\Windows\Temp\winagent-v*.exe`
`C:\Windows\Temp\trmm\*`
+ `C:\temp\tacticalrmm*.exe`
From 92c386ac0e63ebe9564c97b3263e3a6e1835eec7 Mon Sep 17 00:00:00 2001 From: Samuel Meuchel Date: Tue, 6 Jul 2021 19:41:16 -0500 Subject: [PATCH 2/3] Fixed ScreenConnect Collector script for ps 2.0 --- api/tacticalrmm/scripts/community_scripts.json | 2 +- scripts/Win_Screenconnect_GetGUID.ps1 | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/tacticalrmm/scripts/community_scripts.json b/api/tacticalrmm/scripts/community_scripts.json index 3057ddef..da32707c 100644 --- a/api/tacticalrmm/scripts/community_scripts.json +++ b/api/tacticalrmm/scripts/community_scripts.json @@ -175,7 +175,7 @@ "name": "Screenconnect - Get GUID for client", "description": "Returns Screenconnect GUID for client - Use with Custom Fields for later use. ", "args": [ - "-serviceName {{client.ScreenConnectService}}" + "{{client.ScreenConnectService}}" ], "shell": "powershell", "category": "TRMM (Win):Collectors" diff --git a/scripts/Win_Screenconnect_GetGUID.ps1 b/scripts/Win_Screenconnect_GetGUID.ps1 index 1cd423f2..6851968e 100644 --- a/scripts/Win_Screenconnect_GetGUID.ps1 +++ b/scripts/Win_Screenconnect_GetGUID.ps1 @@ -19,8 +19,9 @@ if (!$serviceName) { if (!$ErrorCount -eq 0) { exit 1 } - -$imagePath = Get-Itempropertyvalue "HKLM:\SYSTEM\ControlSet001\Services\$serviceName" -Name "ImagePath" + + +$imagePath = (Get-Item -Path HKLM:\SYSTEM\ControlSet001\Services\$serviceName).GetValue('ImagePath') $imagePath2 = ($imagePath -split "&s=")[1] $machineGUID = ($imagePath2 -split "&k=")[0] Write-Output $machineGUID \ No newline at end of file From 862fc6a946c215b18db79c256b7d284c04e40715 Mon Sep 17 00:00:00 2001 From: Samuel Meuchel Date: Tue, 6 Jul 2021 19:45:03 -0500 Subject: [PATCH 3/3] add newline to end --- scripts/Win_Screenconnect_GetGUID.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Win_Screenconnect_GetGUID.ps1 b/scripts/Win_Screenconnect_GetGUID.ps1 index 6851968e..e304a1fb 100644 --- a/scripts/Win_Screenconnect_GetGUID.ps1 +++ b/scripts/Win_Screenconnect_GetGUID.ps1 @@ -24,4 +24,4 @@ if (!$ErrorCount -eq 0) { $imagePath = (Get-Item -Path HKLM:\SYSTEM\ControlSet001\Services\$serviceName).GetValue('ImagePath') $imagePath2 = ($imagePath -split "&s=")[1] $machineGUID = ($imagePath2 -split "&k=")[0] -Write-Output $machineGUID \ No newline at end of file +Write-Output $machineGUID