Get-vPenTestCompanies

SYNOPSIS

List companies / Get a company

SYNTAX

List (Default)

Get-vPenTestCompanies [-Page <int>] [-PerPage <int>] [-AllResults] [-Raw]

ById

Get-vPenTestCompanies [-CompanyId] <string> [-Raw]

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

Parameter set [ List ] - The Get-vPenTestCompanies cmdlet invokes the GET method of the /companies endpoint (List companies)

Parameter set [ ById ] - The Get-vPenTestCompanies cmdlet invokes the GET method of the /companies/{id} endpoint (Get a company)

EXAMPLES

EXAMPLE 1

Get-vPenTestCompanies

Returns the result of the /companies endpoint

EXAMPLE 2

Get-vPenTestCompanies -Page 2 -PerPage 50

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

EXAMPLE 3

Get-vPenTestCompanies -AllResults

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

EXAMPLE 4

Get-vPenTestCompanies -CompanyId '24b38497-01cd-4539-a7d5-4f4b0ced2228'

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

PARAMETERS

-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

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

-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 /companies Responses : 200 companies found, 401 unauthorized

Endpoint : GET /companies/{id} Responses : 200 company found, 401 unauthorized, 404 company not found