Get-TPHubTaskResult

12 views 0

Description

If a cmdlet may require some time to save the configuration, then it may be helpful to know if the save operation has completed and if it was successful. You can get this information for the following Cmdlets:

  • Set-TPHubNetworkIPV4
  • Set-TPHubEzeepCloudManagement
  • Import-TPHubBackup

Syntax

Get-TPHubTaskResult [-TaskId] <string> [[-TimeOut] <timespan>] [-Proxy <string>]

Parameter Description
-TaskID configuration specified by a variable.
  • TaskID
  • HasCompleted
  • HasFailed
  • Errors
ID of this task
saving process completed: True/False
save operation not successful: True/False
errors that may have occurred
-TimeOut Time how long to wait before performing the query.
-Proxy • optional (from firmware version 1.1): proxy server address
• can also be specified globally using Set-TPHubProxy

Example 1

The following example determines for Set-TPHubNetworkIPV4 whether the protocol has already been switched on and was successful.

$network = Get-TPHubNetworkIPV4
$network.DnsSrv2 = 8.8.8.8
$task = Set-TPHubNetworkIPV4 -Config $network
Get-TPHubTaskResult -TaskId $task.TaskId

Example 2

The following example determines for Set-TPHubEzeepCloudManagement if enabling cloud management of ezeep has already been completed and was successful.

$config = Get-TPHubEzeepCloudManagement
$config.Enabled = 1
$task = Set-TPHubEzeepCloudManagement -Config $config
Get-TPHubTaskResult -TaskId $task.TaskId

Example 3

The following example determines for Import-TPHubBackup whether the restore of the backup has already been completed and was successful. Since it is not completed (HasCompleted = False) during the first query, the query is repeated a few seconds later.

$task = Import-TPHubBackup -Path "C:\ThinPrint Hub\hubbackup_2022-12-22.json"
Get-TPHubTaskResult -TaskId $task.TaskId
...
Get-TPHubTaskResult -TaskId $task.TaskId

Previous Page
Next Page

Was this helpful?