Tpms.Powershell uses a three-step architecture:
Step 1
– specifies settings using the Get-Tpms or Set-Tpms cmdlets
or
– retrieves data from different sources (e. g. from files, databases or ThinPrint Clients)
Step 2
– collects all settings and writes them to a data package (using variables)
Step 3
– sends the data package via Tpms.Service to the relevant agents. Then, the agents execute the commands from the package locally.
Below you’ll find examples for using the cmdlets of Tpms.Powershell to create printers. The printers will be connected to printer ports and printer drivers will be assigned. The printer properties can be received from any other printer which is used as a template or – with printers which use TP Output Gateway as driver – from any ThinPrint Client installed on a Windows computer.
The numbering corresponds to the three steps above. Here, the variable of the data package which contains the settings array is $srv, $srva or $srvb.
Note! The orange marked values in the following examples must be replaced by your own settings. Each comment is preceded with a hash sign ( # ). So, you can copy all command lines including the comments to PowerShell or to an editor and save it as a .ps1 file.