Export-APITCGModuleSettings

SYNOPSIS

Exports the APITCG BaseURI, API key, & JSON configuration information to file

SYNTAX

Set (Default)

Export-APITCGModuleSettings [[-APITCGConfigPath] <string>] [[-APITCGConfigFile] <string>]

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

The Export-APITCGModuleSettings cmdlet exports the APITCG BaseURI, API key, & JSON configuration information to file

Making use of PowerShell’s System.Security.SecureString type, exporting module settings encrypts your API key in a format that can only be unencrypted with the your Windows account as this encryption is tied to your user principal This means that you cannot copy your configuration file to another computer or user account and expect it to work

On Linux & macOS the SecureString is NOT encrypted, it is recommended to use the APITCG_BASE_URI & APITCG_API_KEY environment variables or a secret store instead

EXAMPLES

EXAMPLE 1

Export-APITCGModuleSettings

Validates that the BaseURI, API key, and JSON depth are set then exports their values to the current user’s APITCG configuration file located at: $env:USERPROFILE\Celerium.APITCG\config.psd1

EXAMPLE 2

Export-APITCGModuleSettings -APITCGConfigPath C:\Celerium.APITCG -APITCGConfigFile MyConfig.psd1

Validates that the BaseURI, API key, and JSON depth are set then exports their values to the current user’s APITCG configuration file located at: C:\Celerium.APITCG\MyConfig.psd1

PARAMETERS

-APITCGConfigFile

Define the name of the APITCG configuration file

By default the configuration file is named: config.psd1

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

-APITCGConfigPath

Define the location to store the APITCG configuration file

By default the configuration file is stored in the following location: $env:USERPROFILE\Celerium.APITCG

Type: System.String
DefaultValue: $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop') {"Celerium.APITCG"}else{".Celerium.APITCG"}) )
SupportsWildcards: false
Aliases:
- APITCGConfPath
ParameterSets:
- Name: (All)
  Position: 0
  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

OUTPUTS

NOTES

N/A