Merge pull request #623 from meuchels/develop

Fix SC collector script to work with windows 7
This commit is contained in:
Dan 2021-07-07 00:43:56 -07:00 committed by GitHub
commit 3f5cb5d61c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -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"

View File

@ -9,6 +9,7 @@
`C:\Program Files\Mesh Agent\*`<br/>
`C:\Windows\Temp\winagent-v*.exe`<br/>
`C:\Windows\Temp\trmm\*`<br/>
`C:\temp\tacticalrmm*.exe`<br/>

View File

@ -20,7 +20,8 @@ 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