Merge pull request #623 from meuchels/develop
Fix SC collector script to work with windows 7
This commit is contained in:
commit
3f5cb5d61c
|
@ -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"
|
||||
|
|
|
@ -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/>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue