Keys

Export-APIKey

Synopsis

Returns collection keys in JSON, XML or CSV format.

Syntax

Export-APIKey [[-CollectionID] <Int32>] [[-OutputFileName] <String>] [-PassThru] [[-EdgeRCFile] <String>] [[-Section] <String>] [[-AccountSwitchKey] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Exports keys from a given collection or all collections. You can export keys to a PSCustomObject by default, or you can specify -OutputFilename as either json, csv, or xml.

Parameters

‑AccountSwitchKey

An account credential key that lets you move between accounts when using an API client enabled for multiple accounts. To find account switch keys, use Get-AccountSwitchKey.

‑CollectionID

Your collection's ID. Run Get-APIKeyCollection to retrieve collections available to you.

‑EdgeRCFile

Your EdgeGrid resource file to authenticate your command. Defaults to ~/.edgerc.

‑OutputFileName

A file to write keys to. Must use either the json, csv, or xml file extension.

‑PassThru

When writing keys to a file, enable this option to also output the data as an array of PSCustomObjects.

‑Section

The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to default.

Related Links