Get-vPenTestAgents

SYNOPSIS

Lists agents / Retrieves an agent

SYNTAX

List (Default)

Get-vPenTestAgents [-CompanyId <string>] [-Page <int>] [-PerPage <int>] [-AllResults] [-Raw]

ById

Get-vPenTestAgents [-AgentId] <string> [-Raw]

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

Parameter set [ List ] - The Get-vPenTestAgents cmdlet invokes the GET method of the /agents endpoint (Lists agents)

Parameter set [ ById ] - The Get-vPenTestAgents cmdlet invokes the GET method of the /agents/{id} endpoint (Retrieves an agent)

EXAMPLES

EXAMPLE 1

Get-vPenTestAgents

Returns the result of the /agents endpoint

EXAMPLE 2

Get-vPenTestAgents -Page 2 -PerPage 50

Returns the second page of 50 items from the /agents endpoint

EXAMPLE 3

Get-vPenTestAgents -AllResults

Returns every item from the /agents endpoint by requesting every page

EXAMPLE 4

Get-vPenTestAgents -AgentId '24b38497-01cd-4539-a7d5-4f4b0ced2228'

Returns the result of the /agents/{id} endpoint

PARAMETERS

-AgentId

Agent record_guid

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- id
ParameterSets:
- Name: ById
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-AllResults

Returns every item by requesting every page, 100 items per page unless -PerPage is used

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

-CompanyId

Filter the results by company GUID

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

-Page

Page number for pagination (default: 1)

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

-PerPage

Number of items per page (default: 25, max: 100)

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

-Raw

Returns the full API response (data & pagination values) instead of only the data

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: ''

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.String

OUTPUTS

NOTES

Endpoint : GET /agents Responses : 200 agents found, 401 unauthorized, 404 Company Not Found

Endpoint : GET /agents/{id} Responses : 200 agent found, 401 unauthorized, 404 agent not found