Get-RocketCyberAgent

SYNOPSIS

Gets RocketCyber agents from an account

SYNTAX

Index (Default)

Get-RocketCyberAgent [-AccountId <long[]>] [-ID <string[]>] [-Hostname <string[]>] [-IP <string[]>]
 [-Created <string>] [-OS <string>] [-Version <string>] [-Connectivity <string[]>] [-Config]
 [-Page <int>] [-PageSize <int>] [-Sort <string[]>] [-AllResults]

IndexByCustomTime

Get-RocketCyberAgent [-AccountId <long[]>] [-ID <string[]>] [-Hostname <string[]>] [-IP <string[]>]
 [-StartDate <datetime>] [-EndDate <datetime>] [-OS <string>] [-Version <string>]
 [-Connectivity <string[]>] [-Config] [-Page <int>] [-PageSize <int>] [-Sort <string[]>]
 [-AllResults]

ALIASES

This cmdlet has the following aliases,

  • Get-RCAgent

DESCRIPTION

The Get-RocketCyberAgent cmdlet gets all the device information for all devices associated to the account ID provided

The Get-RocketCyberAgent cmdlet invokes the GET method of the /v3/agents endpoint

EXAMPLES

EXAMPLE 1

Get-RocketCyberAgent

Gets the first 1000 agents from all accounts accessible by the API key

EXAMPLE 2

Get-RocketCyberAgent -AccountId 12345

Gets the first 1000 agents from account 12345

EXAMPLE 3

Get-RocketCyberAgent -ID 'e9487ac5443c1b514f8f2c7ca256bb46'

Gets the agent with the defined ID

EXAMPLE 4

Get-RocketCyberAgent -AccountId 12345 -Sort hostname:asc

Gets the first 1000 agents from account 12345

Data is sorted by hostname and returned in ascending order

EXAMPLE 5

Get-RocketCyberAgent -AccountId 12345 -Connectivity offline,isolated -AllResults

Gets every agent from account 12345 that is either offline or isolated

PARAMETERS

-AccountId

The account ID associated to the device

If not provided, data will be pulled for all accounts accessible by the API key

Multiple comma separated values can be inputted

Type: System.Int64[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-AllResults

Returns all items from an endpoint by requesting every page of the results

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Config

Includes the config object in the response

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Connectivity

The connectivity status of the agent

Multiple comma separated values can be inputted

Allowed values: ‘online’, ‘offline’, ‘isolated’

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Created

The date range for when agents were created

Both the start and end dates are optional, but at least one is required to use this parameter

Cannot be used with the StartDate & EndDate parameters

Start UTC Time End UTC Time

Example: 2022-05-09T00:33:38.245Z|2022-05-10T23:59:38.245Z 2022-05-09T00:33:38.245Z| |2022-05-10T23:59:38.245Z

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Index
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-EndDate

The friendly end date for when agents were created

Both the start and end dates are optional, but at least one is required to use this parameter

Cannot be used with the Created parameter

Date needs to be inputted as yyyy-mm-dd hh:mm:ss

Type: System.DateTime
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: IndexByCustomTime
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Hostname

The device hostname

Multiple comma separated values can be inputted

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ID

The agent ID

Multiple comma separated values can be inputted

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-IP

The IP address tied to the device

Multiple comma separated values can be inputted

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-OS

The OS used by the device

As of 2023-03 using * does not appear to work correctly

Example: Windows* Windows

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Page

The target page of data

This is used with the PageSize parameter to determine how many and which items to return

Default value: 1

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-PageSize

The number of items to return from the data set

Default value: 1000

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Sort

The sort order for the items queried

Not all values can be sorted

Multiple comma separated values can be inputted

Example: hostname:asc accountId:desc

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-StartDate

The friendly start date for when agents were created

Both the start and end dates are optional, but at least one is required to use this parameter

Cannot be used with the Created parameter

Date needs to be inputted as yyyy-mm-dd hh:mm:ss

Type: System.DateTime
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: IndexByCustomTime
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Version

The agent version

As of 2023-03 this filter appears not to work correctly

Example: Server 2019

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Int64[]

OUTPUTS

NOTES

Endpoint : GET /v3/agents