→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎01-14-2016 05:15 PM
Solved! Go to Solution.
‎12-10-2018 01:16 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblRegistry.Value
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where tblAssetCustom.State = 1 And tblRegistry.Valuename = 'ClientID'
$server = $args[0]
$ARG = import-csv "\\<LansweeperServer>\export\TeamViewer_DeviceID.csv" -Delimiter ';' |where-object assetname -like $server | select value -ExpandProperty value
start-process -filepath "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" -argumentlist "-i $ARG"
‎11-02-2021 09:02 PM
powershell -noprofile -executionpolicy bypass -command {actionpath}TV.ps1 {assetid}
# lansweeper db connection details
$mssql_server_instance = "YOUR_DETAILS_HERE"
$mssql_databasename = "YOUR_DETAILS_HERE"
$ms_uid = "YOUR_DETAILS_HERE"
$ms_pwd = "YOUR_DETAILS_HERE"
function GetTeamViewerClientID {
param(
[Parameter(Mandatory = $true)][String] $ms_uid,
[Parameter(Mandatory = $true)][String] $ms_pwd,
[Parameter(Mandatory = $true)][String] $mssql_server_instance,
[Parameter(Mandatory = $true)][String] $mssql_databasename,
[Parameter(Mandatory = $true)][String] $LS_AssetID
)
$dbquery = "SELECT Value FROM lansweeperdb.dbo.tblRegistry WHERE AssetID='"+$LS_AssetID+"' AND Valuename = 'ClientID'"
$connectionString = 'Data Source={0};database={1};User ID={2};Password={3}' -f $mssql_server_instance,$mssql_databasename,$ms_uid,$ms_pwd
$connection = New-Object System.Data.SqlClient.SqlConnection $connectionString
$connection.ConnectionString = $connectionString
$command = New-Object System.Data.SqlClient.SqlCommand
$command.CommandText = $dbquery
$command.Connection = $connection
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $command
$DataSet = New-Object System.Data.DataSet
$EXECUTE_QUERY = $SqlAdapter.Fill($DataSet)
$connection.Close()
foreach ($Row in $DataSet.Tables[0].Rows)
{
$tv_clientid = $Row.Value
}
return $tv_clientid
}
$LS_AssetID = $args[0]
$ARG = GetTeamViewerClientID $ms_uid $ms_pwd $mssql_server_instance $mssql_databasename $LS_AssetID
start-process -filepath "C:\Program Files\TeamViewer\TeamViewer.exe" -argumentlist "-i $ARG"
‎11-02-2021 09:59 PM
‎05-24-2019 02:39 AM
‎12-10-2018 01:16 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblRegistry.Value
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where tblAssetCustom.State = 1 And tblRegistry.Valuename = 'ClientID'
$server = $args[0]
$ARG = import-csv "\\<LansweeperServer>\export\TeamViewer_DeviceID.csv" -Delimiter ';' |where-object assetname -like $server | select value -ExpandProperty value
start-process -filepath "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" -argumentlist "-i $ARG"
‎05-30-2019 11:18 PM
Hendrik.VE wrote:
Hi all,
I managed to create a custom TeamViewer action using this small workaround (currently only for 64 bit TeamViewer clients, but can easily be expanded to support 32 bit TV or older TV versions too, using the registry keys mentioned earlier in this topic):
1. Set up registry scanning for the registry value 'ClientID' from SOFTWARE\WOW6432Node\TeamViewer
2. Create a custom report that exports the hostname and TeamViewer ClientID to a CSV file called 'TeamViewer_DeviceID.csv':Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblRegistry.Value
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where tblAssetCustom.State = 1 And tblRegistry.Valuename = 'ClientID'
3. Add a custom action called 'TeamViewer' which runs the following action:
powershell -noprofile -executionpolicy bypass -command {actionpath}tv.ps1 {computer}
4. In the Actions folder of your Lansweeper server, add the powershell script 'tv.ps1' which contains the following commands:$server = $args[0]
$ARG = import-csv "\\<LansweeperServer>\export\TeamViewer_DeviceID.csv" -Delimiter ';' |where-object assetname -like $server | select value -ExpandProperty value
start-process -filepath "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" -argumentlist "-i $ARG"
5. See the magic happen when clicking on the TeamViewer action.
‎05-23-2019 08:48 PM
Hendrik.VE wrote:
Hi all,
I managed to create a custom TeamViewer action using this small workaround (currently only for 64 bit TeamViewer clients, but can easily be expanded to support 32 bit TV or older TV versions too, using the registry keys mentioned earlier in this topic):
1. Set up registry scanning for the registry value 'ClientID' from SOFTWARE\WOW6432Node\TeamViewer
2. Create a custom report that exports the hostname and TeamViewer ClientID to a CSV file called 'TeamViewer_DeviceID.csv':Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblRegistry.Value
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where tblAssetCustom.State = 1 And tblRegistry.Valuename = 'ClientID'
3. Add a custom action called 'TeamViewer' which runs the following action:
powershell -noprofile -executionpolicy bypass -command {actionpath}tv.ps1 {computer}
4. In the Actions folder of your Lansweeper server, add the powershell script 'tv.ps1' which contains the following commands:$server = $args[0]
$ARG = import-csv "\\<LansweeperServer>\export\TeamViewer_DeviceID.csv" -Delimiter ';' |where-object assetname -like $server | select value -ExpandProperty value
start-process -filepath "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" -argumentlist "-i $ARG"
5. See the magic happen when clicking on the TeamViewer action.
‎02-20-2019 05:01 PM
Hendrik.VE wrote:
Hi all,
I managed to create a custom TeamViewer action using this small workaround (currently only for 64 bit TeamViewer clients, but can easily be expanded to support 32 bit TV or older TV versions too, using the registry keys mentioned earlier in this topic):
1. Set up registry scanning for the registry value 'ClientID' from SOFTWARE\WOW6432Node\TeamViewer
2. Create a custom report that exports the hostname and TeamViewer ClientID to a CSV file called 'TeamViewer_DeviceID.csv':Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblRegistry.Value
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where tblAssetCustom.State = 1 And tblRegistry.Valuename = 'ClientID'
3. Add a custom action called 'TeamViewer' which runs the following action:
powershell -noprofile -executionpolicy bypass -command {actionpath}tv.ps1 {computer}
4. In the Actions folder of your Lansweeper server, add the powershell script 'tv.ps1' which contains the following commands:$server = $args[0]
$ARG = import-csv "\\<LansweeperServer>\export\TeamViewer_DeviceID.csv" -Delimiter ';' |where-object assetname -like $server | select value -ExpandProperty value
start-process -filepath "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" -argumentlist "-i $ARG"
5. See the magic happen when clicking on the TeamViewer action.
‎02-24-2019 07:58 PM
Cripple.Zero wrote:
I presume this wouldn't work for client PCs that only run the TeamViewer QS standalone, correct, but only if it is the local installed (freeware or licensed) client?
‎02-21-2019 05:44 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now