< Back

Get-AMFolder

Sat Jan 11, 2020 2:39 am

NAME Get-AMFolder



SYNOPSIS

Gets AutoMate Enterprise folders.





SYNTAX

Get-AMFolder [[-Name] <String>] [-FilterSet <Hashtable[]>] [-FilterSetMode <String>] [-Path <String>] [-Recurse]

[-RecurseCache <Hashtable>] [-Type <String>] [-SortProperty <String[]>] [-SortDescending] [-Connection <Object>]

[<CommonParameters>]



Get-AMFolder [-InputObject <Object>] [[-Name] <String>] [-FilterSet <Hashtable[]>] [-FilterSetMode <String>]

[-Path <String>] [-Parent] [-Recurse] [-RecurseCache <Hashtable>] [-Type <String>] [-SortProperty <String[]>]

[-SortDescending] [-Connection <Object>] [<CommonParameters>]



Get-AMFolder [[-Name] <String>] [-ID <String>] [-FilterSet <Hashtable[]>] [-FilterSetMode <String>] [-Path

<String>] [-Recurse] [-RecurseCache <Hashtable>] [-Type <String>] [-SortProperty <String[]>] [-SortDescending]

[-Connection <Object>] [<CommonParameters>]





DESCRIPTION

Get-AMFolder gets folders objects from AutoMate Enterprise. Get-AMFolder can receive items on the pipeline and

return related objects.





PARAMETERS

-InputObject <Object>

The object(s) to use in search for folders.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Name <String>

The name of the folder (case sensitive). Wildcard characters can be escaped using the ` character. If using

escaped wildcards, the string

must be wrapped in single quotes. For example: Get-AMFolder -Name '`[Test`]'



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ID <String>

The ID of the folder.



Required? false

Position? named

Default value

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



-Path <String>

The path containing the folder.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Parent [<SwitchParameter>]

Get folders that contain the specified folders. This parameter is only used when a folder is piped in.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Recurse [<SwitchParameter>]

If specified, searches recursively for subfolders.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-RecurseCache <Hashtable>

-RecurseCache is a private parameter used only within this function, and should not be used externally.

This parameter allows the folder cache to be passed to subsequent, recursive calls



Required? false

Position? named

Default value @{}

Accept pipeline input? false

Accept wildcard characters? false



-Type <String>

The folder type: AGENTGROUPS, CONDITIONS, PROCESSAGENTS, PROCESSES, TASKAGENTS, TASKS, USERGROUPS, USERS,

WORKFLOWS



Required? false

Position? named

Default value

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 @("Path","Name")

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

Agents related to the following objects can be retrieved by this function:

Folder

Workflow

Task

Process

Condition

Agent

AgentGroup

User

UserGroup





OUTPUTS

Folder





-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Get folder "My Folder"



Get-AMFolder "My Folder"









-------------------------- EXAMPLE 2 --------------------------



PS C:\\># Get folder containing workflow "My Workflow"



Get-AMWorkflow "My Workflow" | Get-AMFolder









-------------------------- EXAMPLE 3 --------------------------



PS C:\\># Get workflows in "My Folder"



Get-AMFolder "My Folder" -Type WORKFLOWS | Get-AMWorkflow









-------------------------- EXAMPLE 4 --------------------------



PS C:\\># Get folder "My Folder" by path



Get-AMFolder -Path "\\PROCESSES" -Name "My Folder"









-------------------------- EXAMPLE 5 --------------------------



PS C:\\># Get subfolders of "My Folder"



Get-AMFolder "My Folder" -Type PROCESSES | Get-AMFolder









-------------------------- EXAMPLE 6 --------------------------



PS C:\\># Get folders using filter sets



Get-AMFolder -FilterSet @{ Property = "Path"; Operator = "contains"; Value = "WORKFLOWS"}











RELATED LINKS

https://github.com/AutomatePS/AutomatePS