< Back

Get-AutomateClient

Sat Jan 11, 2020 2:05 am

NAME Get-AutomateClient



SYNOPSIS

Get Client information out of the Automate API





SYNTAX

Get-AutomateClient [[-ClientId] <Int32[]>] [<CommonParameters>]



Get-AutomateClient [-AllClients] [-IncludeFields <String>] [-ExcludeFields <String>] [-OrderBy <String>]

[<CommonParameters>]



Get-AutomateClient [-Condition <String>] [-IncludeFields <String>] [-ExcludeFields <String>] [-OrderBy <String>]

[<CommonParameters>]



Get-AutomateClient [-IncludeFields <String>] [-ExcludeFields <String>] [-OrderBy <String>] [-ClientName <String>]

[-LocationId <Int32>] [-LocationName <String>] [<CommonParameters>]





DESCRIPTION

Connects to the Automate API and returns one or more full client objects





PARAMETERS

-ClientId <Int32[]>

ClientID to search for, integer, -ClientID 1



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AllClients [<SwitchParameter>]

Returns all clients in Automate, regardless of amount



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Condition <String>

A custom condition to build searches that can be used to search for specific things. Supported operators are

'=', 'eq', '>', '>=', '<', '<=', 'and', 'or', '()', 'like', 'contains', 'in', 'not'.

The 'not' operator is only used with 'in', 'like', or 'contains'. The '=' and 'eq' operator are the same.

String values can be surrounded with either single or double quotes. IE (RemoteAgentLastContact <=

2019-12-18T00:50:19.575Z)

Boolean values are specified as 'true' or 'false'. Parenthesis can be used to control the order of operations

and group conditions.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IncludeFields <String>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ExcludeFields <String>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OrderBy <String>

A comma separated list of fields that you want to order by finishing with either an asc or desc.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ClientName <String>

Client name to search for, uses wildcards so full client name is not needed



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LocationId <Int32>

LocationID to search for, integer, -LocationID 2



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-LocationName <String>

Location name to search for, uses wildcards so full location name is not needed



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



OUTPUTS

Client objects





NOTES





Version: 1.0

Author: Gavin Stone and Andrea Mastellone

Creation Date: 2019-03-19

Purpose/Change: Initial script development



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



PS C:\\>Get-AutomateClient -AllClients













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



PS C:\\>Get-AutomateClient -ClientId 4













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



PS C:\\>Get-AutomateClient -ClientName "Rancor"













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



PS C:\\>Get-AutomateClient -Condition "(City != 'Baltimore')"















RELATED LINKS