< Back
Get-AMInstance
Post
NAME Get-AMInstance
SYNOPSIS
Gets AutoMate Enterprise workflow and task instances.
SYNTAX
Get-AMInstance [-StartDate <DateTime>] [-EndDate <DateTime>] [-Status {Success | Failed | Aborted | Stopped |
TimedOut | Paused | Queued | Running | ResumedFromFailure | Completed | All}] [-FilterSet <Hashtable[]>]
[-FilterSetMode <String>] [-IncludeRelative] [-SortProperty <String[]>] [-SortDescending] [-Connection <Object>]
[<CommonParameters>]
Get-AMInstance [-InputObject <Object>] [-StartDate <DateTime>] [-EndDate <DateTime>] [-Status {Success | Failed |
Aborted | Stopped | TimedOut | Paused | Queued | Running | ResumedFromFailure | Completed | All}] [-FilterSet
<Hashtable[]>] [-FilterSetMode <String>] [-IncludeRelative] [-SortProperty <String[]>] [-SortDescending]
[-Connection <Object>] [<CommonParameters>]
Get-AMInstance [[-ID] <String>] [-StartDate <DateTime>] [-EndDate <DateTime>] [-Status {Success | Failed | Aborted
| Stopped | TimedOut | Paused | Queued | Running | ResumedFromFailure | Completed | All}] [-FilterSet
<Hashtable[]>] [-FilterSetMode <String>] [-IncludeRelative] [-SortProperty <String[]>] [-SortDescending]
[-Connection <Object>] [<CommonParameters>]
Get-AMInstance [-TransactionID <String>] [-StartDate <DateTime>] [-EndDate <DateTime>] [-Status {Success | Failed
| Aborted | Stopped | TimedOut | Paused | Queued | Running | ResumedFromFailure | Completed | All}] [-FilterSet
<Hashtable[]>] [-FilterSetMode <String>] [-IncludeRelative] [-SortProperty <String[]>] [-SortDescending]
[-Connection <Object>] [<CommonParameters>]
DESCRIPTION
Get-AMInstance gets instance objects from AutoMate Enterprise. Get-AMInstance can receive items on the pipeline
and return related objects.
PARAMETERS
-InputObject <Object>
The object(s) to use in search for instances.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-ID <String>
The ID of the instance.
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-TransactionID <String>
The transaction ID of the instance.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-StartDate <DateTime>
The first date of events to retrieve (Default: 1 day ago).
Required? false
Position? named
Default value (Get-Date).AddDays(-1)
Accept pipeline input? false
Accept wildcard characters? false
-EndDate <DateTime>
The last date of events to retrieve (Default: now).
Required? false
Position? named
Default value (Get-Date)
Accept pipeline input? false
Accept wildcard characters? false
-Status
The status of the instance:
All
Completed
Running
Success
Failed
Stopped
Paused
Aborted
Queued
ResumedFromFailure
Required? false
Position? named
Default value All
Accept pipeline input? false
Accept wildcard characters? false
-FilterSet <Hashtable[]>
The parameters to filter the search on. Supply hashtable(s) with the following properties: Property,
Operator, Value.
Valid values for the Operator are: =, !=, <, >, contains (default - no need to supply Operator when using
'contains')
Required? false
Position? named
Default value @()
Accept pipeline input? false
Accept wildcard characters? false
-FilterSetMode <String>
If multiple filter sets are provided, FilterSetMode determines if the filter sets should be evaluated with an
AND or an OR
Required? false
Position? named
Default value And
Accept pipeline input? false
Accept wildcard characters? false
-IncludeRelative [<SwitchParameter>]
If instance is searched for using the -ID parameter, or when a workflow, task or process is piped in, related
instances are also returned.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-SortProperty <String[]>
The object property to sort results on. Do not use ConnectionAlias, since it is a custom property added by
this module, and not exposed in the API.
Required? false
Position? named
Default value StartDateTime
Accept pipeline input? false
Accept wildcard characters? false
-SortDescending [<SwitchParameter>]
If specified, this will sort the output on the specified SortProperty in descending order. Otherwise,
ascending order is assumed.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Connection <Object>
The AutoMate Enterprise management server.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Instances of the following objects can be retrieved by this function:
Workflow
Task
Folder
TaskAgent
ProcessAgent
OUTPUTS
Instance
-------------------------- EXAMPLE 1 --------------------------
PS C:\\># Get currently running instances
Get-AMInstance -Status Running
-------------------------- EXAMPLE 2 --------------------------
PS C:\\># Get failed instances of workflow "My Workflow"
Get-AMWorkflow "My Workflow" | Get-AMInstance -Status Failed
-------------------------- EXAMPLE 3 --------------------------
PS C:\\># Get instances using filter sets
Get-AMInstance -FilterSet @{ Property = "ResultText"; Operator = "contains"; Value = "FTP Workflow"}
RELATED LINKS
https://github.com/AutomatePS/AutomatePS
SYNOPSIS
Gets AutoMate Enterprise workflow and task instances.
SYNTAX
Get-AMInstance [-StartDate <DateTime>] [-EndDate <DateTime>] [-Status {Success | Failed | Aborted | Stopped |
TimedOut | Paused | Queued | Running | ResumedFromFailure | Completed | All}] [-FilterSet <Hashtable[]>]
[-FilterSetMode <String>] [-IncludeRelative] [-SortProperty <String[]>] [-SortDescending] [-Connection <Object>]
[<CommonParameters>]
Get-AMInstance [-InputObject <Object>] [-StartDate <DateTime>] [-EndDate <DateTime>] [-Status {Success | Failed |
Aborted | Stopped | TimedOut | Paused | Queued | Running | ResumedFromFailure | Completed | All}] [-FilterSet
<Hashtable[]>] [-FilterSetMode <String>] [-IncludeRelative] [-SortProperty <String[]>] [-SortDescending]
[-Connection <Object>] [<CommonParameters>]
Get-AMInstance [[-ID] <String>] [-StartDate <DateTime>] [-EndDate <DateTime>] [-Status {Success | Failed | Aborted
| Stopped | TimedOut | Paused | Queued | Running | ResumedFromFailure | Completed | All}] [-FilterSet
<Hashtable[]>] [-FilterSetMode <String>] [-IncludeRelative] [-SortProperty <String[]>] [-SortDescending]
[-Connection <Object>] [<CommonParameters>]
Get-AMInstance [-TransactionID <String>] [-StartDate <DateTime>] [-EndDate <DateTime>] [-Status {Success | Failed
| Aborted | Stopped | TimedOut | Paused | Queued | Running | ResumedFromFailure | Completed | All}] [-FilterSet
<Hashtable[]>] [-FilterSetMode <String>] [-IncludeRelative] [-SortProperty <String[]>] [-SortDescending]
[-Connection <Object>] [<CommonParameters>]
DESCRIPTION
Get-AMInstance gets instance objects from AutoMate Enterprise. Get-AMInstance can receive items on the pipeline
and return related objects.
PARAMETERS
-InputObject <Object>
The object(s) to use in search for instances.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-ID <String>
The ID of the instance.
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-TransactionID <String>
The transaction ID of the instance.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-StartDate <DateTime>
The first date of events to retrieve (Default: 1 day ago).
Required? false
Position? named
Default value (Get-Date).AddDays(-1)
Accept pipeline input? false
Accept wildcard characters? false
-EndDate <DateTime>
The last date of events to retrieve (Default: now).
Required? false
Position? named
Default value (Get-Date)
Accept pipeline input? false
Accept wildcard characters? false
-Status
The status of the instance:
All
Completed
Running
Success
Failed
Stopped
Paused
Aborted
Queued
ResumedFromFailure
Required? false
Position? named
Default value All
Accept pipeline input? false
Accept wildcard characters? false
-FilterSet <Hashtable[]>
The parameters to filter the search on. Supply hashtable(s) with the following properties: Property,
Operator, Value.
Valid values for the Operator are: =, !=, <, >, contains (default - no need to supply Operator when using
'contains')
Required? false
Position? named
Default value @()
Accept pipeline input? false
Accept wildcard characters? false
-FilterSetMode <String>
If multiple filter sets are provided, FilterSetMode determines if the filter sets should be evaluated with an
AND or an OR
Required? false
Position? named
Default value And
Accept pipeline input? false
Accept wildcard characters? false
-IncludeRelative [<SwitchParameter>]
If instance is searched for using the -ID parameter, or when a workflow, task or process is piped in, related
instances are also returned.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-SortProperty <String[]>
The object property to sort results on. Do not use ConnectionAlias, since it is a custom property added by
this module, and not exposed in the API.
Required? false
Position? named
Default value StartDateTime
Accept pipeline input? false
Accept wildcard characters? false
-SortDescending [<SwitchParameter>]
If specified, this will sort the output on the specified SortProperty in descending order. Otherwise,
ascending order is assumed.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Connection <Object>
The AutoMate Enterprise management server.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Instances of the following objects can be retrieved by this function:
Workflow
Task
Folder
TaskAgent
ProcessAgent
OUTPUTS
Instance
-------------------------- EXAMPLE 1 --------------------------
PS C:\\># Get currently running instances
Get-AMInstance -Status Running
-------------------------- EXAMPLE 2 --------------------------
PS C:\\># Get failed instances of workflow "My Workflow"
Get-AMWorkflow "My Workflow" | Get-AMInstance -Status Failed
-------------------------- EXAMPLE 3 --------------------------
PS C:\\># Get instances using filter sets
Get-AMInstance -FilterSet @{ Property = "ResultText"; Operator = "contains"; Value = "FTP Workflow"}
RELATED LINKS
https://github.com/AutomatePS/AutomatePS