< Back

Get-AutomateComputer

Sat Jan 11, 2020 2:06 am

NAME Get-AutomateComputer



SYNOPSIS

Get Computer information out of the Automate API





SYNTAX

Get-AutomateComputer [[-ComputerID] <Int32[]>] [<CommonParameters>]



Get-AutomateComputer [-AllComputers] [-IncludeFields <String>] [-ExcludeFields <String>] [-OrderBy <String>]

[<CommonParameters>]



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

[<CommonParameters>]



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

<String>] [-ClientId <Int32>] [-LocationId <Int32>] [-LocationName <String>] [-ComputerName <String>] [-OpenPort

<String>] [-OperatingSystem <String>] [-DomainName <String>] [-NotSeenInDays <Int32>] [-Comment <String>]

[-LastWindowsUpdateInDays <Int32>] [-AntiVirusDefinitionInDays <String>] [-LocalIPAddress <String>]

[-GatewayIPAddress <String>] [-MacAddress <String>] [-LoggedInUser <String>] [-Master <Boolean>] [-NetworkProbe

<Boolean>] [-MaintenanceMode <Boolean>] [-VirtualMachine <Boolean>] [-DDay] [-Online <Boolean>]

[-UserIdleLongerThanMinutes <Int32>] [-UptimeLongerThanMinutes <Int32>] [-AssetTag <String>] [-Server <Boolean>]

[-Workstation <Boolean>] [-AntivirusScanner <String>] [-RebootNeeded <Boolean>] [-VirtualHost <Boolean>]

[-SerialNumber <String>] [-BiosManufacturer <String>] [-BiosVersion <String>] [-LocalUserAccounts <String>]

[<CommonParameters>]





DESCRIPTION

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





PARAMETERS

-ComputerID <Int32[]>

Can take either single ComputerID integer, IE 1, or an array of ComputerID integers, IE 1,5,9



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AllComputers [<SwitchParameter>]

Returns all computers 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>

A comma separated list of fields that you want including in the returned computer object.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ExcludeFields <String>

A comma separated list of fields that you want excluding in the returned computer object.



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



-ClientId <Int32>

ClientID to search for, integer, -ClientID 1



Required? false

Position? named

Default value 0

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



-ComputerName <String>

Computer name to search for, uses wildcards so full computer name is not needed



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OpenPort <String>

Searches through all computers and finds where a UDP or TCP port is open. Can either take a single number, ie

-OpenPort "443"



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OperatingSystem <String>

Operating system name to search for, uses wildcards so full OS Name not needed. IE: -OperatingSystem "Windows

7"



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DomainName <String>

Domain name to search for, uses wildcards so full OS Name not needed. IE: -DomainName ".local"



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NotSeenInDays <Int32>

Returns all computers that have not been seen in an amount of days. IE: -NotSeenInDays 30



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-Comment <String>

Returns all computers that have a comment set with the computer in Automate. Wildcard search.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LastWindowsUpdateInDays <Int32>

Returns computers where the LastWindowUpdate in days is over a certain amount. This is not based on patch

manager information but information in Windows



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-AntiVirusDefinitionInDays <String>

Returns computers where the Antivirus definitions are older than x days



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LocalIPAddress <String>

Returns computers with a specific local IP address



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-GatewayIPAddress <String>

Returns the external IP of the Computer



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-MacAddress <String>

Returns computers with an mac address as a wildcard search



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LoggedInUser <String>

Returns computers with a certain logged in user, using wildcard search, IE: -LoggedInUser "Gavin" will find

all computers where a Gavin is logged in.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Master <Boolean>

Returns computers that are Automate masters



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-NetworkProbe <Boolean>

Returns computers that are Automate network probes



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-MaintenanceMode <Boolean>



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-VirtualMachine <Boolean>



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DDay [<SwitchParameter>]

Returns agents that are affected by the Automate Binary issue hitting on 9th March 2019



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Online <Boolean>

Returns agents that are online or offline, IE -Online $true or alternatively -Online $false



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-UserIdleLongerThanMinutes <Int32>

Takes an integer in minutes and brings back all users who have been idle on their machines longer than that.

IE -UserIdleLongerThanMinutes 60



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-UptimeLongerThanMinutes <Int32>

Takes an integer in minutes and brings back all computers that have an uptime longer than x minutes. IE

-UptimeLongerThanMinutes 60



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-AssetTag <String>

Return computers with a certain asset tag - a wildcard search



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Server <Boolean>

Return computers that are servers, boolean value can be used as -Server $true or -Server $false



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Workstation <Boolean>

Return computers that are workstations, boolean value can be used as -Workstation $true or -Workstation $false



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-AntivirusScanner <String>

Return computers that have a certain antivirus. Wildcard search.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RebootNeeded <Boolean>

Return computers that need a reboot. Bool. -RebootNeeded $true or -RebootNeeded $false



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-VirtualHost <Boolean>

Return computers that are virtual hosts. Bool. -VirtualHost $true or -VirtualHost $false



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-SerialNumber <String>

Return computers that have a serial number specified. Wildcard Search



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BiosManufacturer <String>

Return computers with a specific Bios Manufacturer. Wildcard search.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BiosVersion <String>

Return computers with a specific BIOS Version. This is a string search and a wildcard.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LocalUserAccounts <String>

Return computers where certain local user accounts are present



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

Computer Objects





NOTES





Version: 1.0

Author: Gavin Stone

Creation Date: 2019-01-20

Purpose/Change: Initial script development



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



PS C:\\>Get-AutomateComputer -AllComputers













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



PS C:\\>Get-AutomateComputer -OperatingSystem "Windows 7"













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



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













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



PS C:\\>Get-AutomateComputer -Condition "(Type != 'Workstation')"















RELATED LINKS