Open navigation

Get-TPHubTaskResult

Description

Syntax

Example 1

Example 2

Example 3



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>]
ParameterDescription
-TaskIDconfiguration 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
-TimeOutTime 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

ThinPrint Hub's PowerShell cmdlet Get-TPHubTaskResult: The example determines for Set-TPHubNetworkIPV4 whether the protocol has already been switched on and was successful.


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

ThinPrint Hub's PowerShell cmdlet Get-TPHubTaskResult: The example determines for Set-TPHubEzeepCloudManagement if enabling cloud management of ezeep has already been completed and was successful.


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

ThinPrint Hub's PowerShell cmdlet Get-TPHubTaskResult: The example determines for Import-TPHubBackup whether the restore of the backup has already been completed.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.