Overview of PowerShell commands
You can also use PowerShell for license management. That way it’s possible, for example, to integrate the activation of new users into automated processes.
Preparation
- Log in to the license server with a user account that has administrator permissions and is a member of the local ThinPrint Configuration Admins group.
- Run PowerShell for the first time as administrator.
- Set the policies to import and use the PowerShell modules that were created when installing License Server.
To do so, enter the following command during the first use:
Set-ExecutionPolicy Remotesigned
- Confirm the adjustment of the Policy with Y for yes (arrow).
Import PowerShell module
Import modules
Each time you open a PowerShell session or run a script, you have to import the PowerShell modules. For this, enter the following command on the license server and confirm with Enter.
Import-module TPPowerShell
Remote access to TPPowerShell
- On the license server, run the following generic PowerShell cmdlet (depending on the age of the Windows version):
Enable-PSRemoting
- On the remote computer, run the following cmdlet:
Enter-PSSession -ComputerName <license-server-address> -Credential <credentials>
Example:
Enter-PSSession -ComputerName tp-lics-06.ourdomain.local -Credential (Get-Credential -Message "Please enter your credentials." -UserName "ourdomain\Administrator")
- If not already running on the license server, then run remotely:
Import-Module TPPowerShell
Overview of PowerShell commands
To get a list of all available commands (cmdlets), enter the following:
Get-Command -Module TPPowerShell
Then the available PowerShell commands will be displayed.
The following commands (cmdlets) are available:
Cmdlet | Function |
Connect-TP | • establishes the required connection to the license server • user name and password required |
Disconnect-TP | closes an existing connection to the license server |
Get-TPLicenseInfo | returns the number of used, free, and blocked licenses, as well as whether the number of users is limited or unlimited |
Set-TPUserActivationMode | switches between the license activation modes automatically and manually |
Get-TPUser | displays the list of imported ThinPrint user accounts with their display names |
Sync-TPUsers | synchronizes the ThinPrint users with the Active Directory (corresponds to the Synchronize function) |
Get-TPUserSettings | returns the settings of certain ThinPrint users |
Set-TPUserSettings | sets individual settings for a particular ThinPrint user |
Add-TPUser | imports users from Active Directory and activates them for ThinPrint |
Update-TPUser | disables / enables ThinPrint users |
Remove-TPUser | deletes ThinPrint users and releases their licenses |
Help for PowerShell commands
You can display help texts for all PowerShell cmdlets.
- Enter the designated command according to the following pattern:
Get-Help Add-TPUser
- To get further information you can add one of the following parameters:
- Detailed
- Online