54 views 0


Starts a query to retrieve printer information from target machines.


  • ThinPrint Clients


Start-TpmsQueryByAgent -Servers <psobject[]>

Parameter Description
-Servers list of target machines

Example 1: cmdlet usage

The following example retrieves printer information from the computer list represented by the $server vari­able.

Start-TpmsQueryByAgent ($server)

Example 2: Script containing Start-TpmsQueryByAgent

The following script displays the printer lists from ThinPrint Clients which are defined in a .csv file.

  • The definition file thinprint-clients.csv:



  • The PowerShell script:
$allclients = @()

Import-Csv -Path .\thinprint-clients.csv | foreach {

if($_.Selected -eq 1)


$client = New-TpmsObjTpClient -Name $_.Address -Port 4000


$allclients += $client


$srva = New-TpmsObjQueryAgent -Name "cps47.ourdomain.local" -Port 5050 -ClientQueries ($allclients)

Start-TpmsQueryByAgent -Servers ($srva) | Format-TpmsDispatch

On the target machine cps47, Tpms.Agent connects to the ThinPrint Client addresses defined in thin­print-clients.csv and stores their information to $allclients.

printer lists retrieved from two ThinPrint Clients running on and

Previous Page
Next Page

Was this helpful?