Add TeamViewer Script and Integration Docs
This commit is contained in:
parent
6a06734192
commit
0e77d575c4
|
@ -180,6 +180,18 @@
|
|||
"shell": "powershell",
|
||||
"category": "TRMM (Win):Collectors"
|
||||
},
|
||||
{
|
||||
"guid": "9cfdfe8f-82bf-4081-a59f-576d694f4649",
|
||||
"filename": "Win_Teamviewer_Get_ID.ps1",
|
||||
"submittedBy": "https://github.com/silversword411",
|
||||
"name": "TeamViewer - Get ClientID for client",
|
||||
"description": "Returns Teamviwer ClientID for client - Use with Custom Fields for later use. ",
|
||||
"args": [
|
||||
"-serviceName {{client.ScreenConnectService}}"
|
||||
],
|
||||
"shell": "powershell",
|
||||
"category": "TRMM (Win):Collectors"
|
||||
},
|
||||
{
|
||||
"guid": "95a2ee6f-b89b-4551-856e-3081b041caa7",
|
||||
"filename": "Win_Power_Profile_Reset_High_Performance_to_Defaults.ps1",
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
# TeamViewer
|
||||
|
||||
## TeamViewer Integration
|
||||
|
||||
!!!info
|
||||
You can setup a full automation policy to collect the machine GUID but this example will collect from just one agent for testing purposes.
|
||||
|
||||
From the UI go to **Settings > Global Settings > CUSTOM FIELDS > Agents**
|
||||
|
||||
Add Custom Field</br>
|
||||
**Target** = `Agent`</br>
|
||||
**Name** = `TeamViewerClientID`</br>
|
||||
**Field Type** = `Text`</br>
|
||||
|
||||

|
||||
|
||||
While in Global Settings go to **URL ACTIONS**
|
||||
|
||||
Add a URL Action</br>
|
||||
**Name** = `TeamViewer Control`</br>
|
||||
**Description** = `Connect to a Team Viewer Session`</br>
|
||||
**URL Pattern** =
|
||||
|
||||
```html
|
||||
https://start.teamviewer.com/device/{{agent.TeamViewerClientID}}/authorization/password/mode/control
|
||||
```
|
||||
|
||||
|
||||
Navigate to an agent with TeamViewer running (or apply using **Settings > Automation Manager**).</br>
|
||||
Go to Tasks.</br>
|
||||
Add Task</br>
|
||||
**Select Script** = `TeamViewer - Get ClientID for client` (this is a builtin script from script library)</br>
|
||||
**Descriptive name of task** = `Collects the ClientID for TeamViewer.`</br>
|
||||
**Collector Task** = `CHECKED`</br>
|
||||
**Custom Field to update** = `TeamViewerClientID`</br>
|
||||
|
||||

|
||||
|
||||
Click **Next**</br>
|
||||
Check **Manual**</br>
|
||||
Click **Add Task**
|
||||
|
||||
Right click on the newly created task and click **Run Task Now**.
|
||||
|
||||
Give it a second to execute then right click the agent that you are working with and go to **Run URL Action > TeamViewer Control**
|
||||
|
||||
It launch the session and possibly promt for password in TeamViewer.
|
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
|
@ -0,0 +1,30 @@
|
|||
# Retrieve Teamviewer ID from TRMM agent. This tests versions 6+ known Registry Paths.
|
||||
|
||||
$TeamViewerVersionsNums = @('6', '7', '8', '9', '')
|
||||
$RegPaths = @('HKLM:\SOFTWARE\TeamViewer', 'HKLM:\SOFTWARE\Wow6432Node\TeamViewer')
|
||||
$Paths = @(foreach ($TeamViewerVersionsNum in $TeamViewerVersionsNums) {
|
||||
foreach ($RegPath in $RegPaths) {
|
||||
$RegPath + $TeamViewerVersionsNum
|
||||
}
|
||||
})
|
||||
|
||||
foreach ($Path in $Paths) {
|
||||
If (Test-Path $Path) {
|
||||
$GoodPath = $Path
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($FullPath in $GoodPath) {
|
||||
If ($null -ne (Get-Item -Path $FullPath).GetValue('ClientID')) {
|
||||
$TeamViewerID = (Get-Item -Path $FullPath).GetValue('ClientID')
|
||||
$ErrorActionPreference = 'silentlycontinue'
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Write-Output $TeamViewerID
|
||||
|
||||
|
||||
Exit $LASTEXITCODE
|
|
@ -1,17 +0,0 @@
|
|||
# Retrieve Teamviewer ID from TRMM agent
|
||||
|
||||
$clientId = Get-ItemProperty HKLM:\SOFTWARE\Wow6432Node\TeamViewer -Name ClientID -ErrorAction SilentlyContinue
|
||||
|
||||
If (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\TeamViewer' -Name ClientID -ErrorAction SilentlyContinue) {
|
||||
|
||||
Write-Output $clientid.Clientid
|
||||
exit 0
|
||||
|
||||
}
|
||||
Else {
|
||||
|
||||
Write-Output 'Teamviewer is not installed.'
|
||||
exit 1
|
||||
}
|
||||
|
||||
Exit $LASTEXITCODE
|
Loading…
Reference in New Issue