Skip to content

Export-GitHubVariable

SYNOPSIS

Exports a GitHub variable to the local environment.

SYNTAX

__AllParameterSets

Export-GitHubVariable [-Name] <string> [-Value] <string> [[-Target] <EnvironmentVariableTarget>]
 [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

This function takes a GitHub variable and sets it as an environment variable. The variable can be exported to the Process, User, or Machine environment scope.

By default, the variable is exported to the Process scope, meaning it will persist only for the current session.

The function accepts pipeline input, allowing GitHub variables retrieved using Get-GitHubVariable to be exported seamlessly.

EXAMPLES

EXAMPLE 1

Get-GitHubVariable -Owner 'octocat' -Repository 'Hello-World' -Environment 'staging' | Export-GitHubVariable

Exports the variables retrieved from the GitHub API to the local environment.

PARAMETERS

-Name

The name of the variable.

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

-Target

The target scope for the environment variable.

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

-Value

The value of the variable.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  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

GitHubVariable

{{ Fill in the Description }}

System.String

{{ Fill in the Description }}

OUTPUTS

void

{{ Fill in the Description }}

System.Void

{{ Fill in the Description }}

NOTES