In this guide, you will learn how to add users to the TeamViewer Single Sign-On (SSO) exclusion list using a CSV file. The script provided, Add-SsoExclusionsFromCSV.ps1
, simplifies this process and allows you to efficiently manage user exclusions.
This article applies to TeamViewer Tensor license holders.
Before you start, make sure you have the TeamViewerPS PowerShell module installed.
This script relies on the TeamViewerPS PowerShell module. If you haven't already installed it, you can do so using the following command:
Install-Module TeamViewerPS
Now that you have the TeamViewerPS PowerShell module installed, you can proceed to add users from a CSV file to the TeamViewer SSO exclusion list:
Add-SsoExclusionsFromCSV.ps1
script is located. Use the following command to import users from the CSV file:.\Add-SsoExclusionsFromCSV -Path 'c:\Example.csv' -HeaderName 'Email'
Replace 'c:\Example.csv'
with the actual path to your CSV file if it's located in a different directory.
This command will read the CSV file and add the specified users to the TeamViewer SSO exclusion list.
If you wish to use an API token for authentication, you can provide it as follows:
Generate an API Token: Create a secure API token and convert it to a secure string. For example:
$apiToken = 'SecretToken123' | ConvertTo-SecureString -AsPlainText -Force
Run the Script with API Token: Run the script with the -ApiToken
parameter:
.\Add-SsoExclusionsFromCSV -Path 'c:\Example.csv' -HeaderName 'Email' -ApiToken $apiToken
This will ensure that the script uses the provided API token for authentication.
You can run the import script in "Test Mode" to preview the changes that would be made without actually applying them. This is useful for ensuring that the CSV file and script parameters are set correctly:
.\Add-SsoExclusionsFromCSV -Path 'c:\Example.csv' -HeaderName 'Email' -WhatIf
This command will display a simulation of the changes without making any actual modifications.
If you need additional information about the script and its parameters, you can use the Get-Help
PowerShell cmdlet:
Get-Help -Detailed .\Add-SsoExclusionsFromCSV.ps1
This command will provide detailed information about how to use the script and its available parameters.
By following these instructions, you can easily add users to the TeamViewer SSO exclusion list via CSV import, helping you manage user access more efficiently.