Imports a set of users to a TeamViewer company.
The script imports and updates a set of users to the TeamViewer company that corresponds to a given API token. By default, the users will be loaded from a given CSV-formatted file. There is also an option to pipeline userdata to this script. In contrast to the definition of the "Import-" verb for Powershell, this script does NOT import the users from TeamViewer to Powershell, but performs the reverse operation, by creating/updating TeamViewer users.
This script requires the TeamViewerPS powershell module to be installed.
Install-Module TeamViewerPS.\Import-TeamViewerUser 'example.csv'$apiToken = 'SecretToken123' | ConvertTo-SecureString -AsPlainText -Force
.\Import-TeamViewerUser -ApiToken $apiToken -Path 'example.csv' -Delimiter ';'$pwd = ConvertTo-SecureString 'MyPassword123' -AsPlainText -Force
.\Import-TeamViewerUser 'example.csv' -DefaultUserPassword $pwd$users = @(
@{email = 'user1@example.test'; name = 'Test User 1'},
@{email = 'user2@example.test'; name = 'Test User 2'; password = 'AnotherPassword123'},
@{email = 'user3@example.test'; name = 'Test User 3'}
)
$pwd = ConvertTo-SecureString 'MyPassword123' -AsPlainText -Force
$users | .\Import-TeamViewerUser -DefaultUserPassword $pwd.\Import-TeamViewerUser 'example.csv' -WhatIfTo get further help about the script and its parameters, execute the
Get-Help PowerShell cmdlet:
Get-Help -Detailed .\Import-TeamViewerUser.ps1