Skip to content

Add-GitHubMask

SYNOPSIS

Masks a value in a log

SYNTAX

__AllParameterSets

Add-GitHubMask [-Value] <string[]> [<CommonParameters>]

ALIASES

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

DESCRIPTION

Masking a value prevents a string or variable from being printed in the log. Each masked word separated by whitespace is replaced with the * character. You can use an environment variable or string for the mask's value. When you mask a value, it is treated as a secret and will be redacted on the runner. For example, after you mask a value, you won't be able to set that value as an output.

EXAMPLES

EXAMPLE 1

Add-Mask $SecretValue

Masks the value of $SecretValue so that its printed like ***.

EXAMPLE 2

$SecretValue1, $SecretValue2 | Mask

Masks the value of $SecretValue1 and $SecretValue2 so that its printed like ***, using the pipeline

PARAMETERS

-Value

The value to mask

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

{{ Fill in the Description }}

OUTPUTS

NOTES

Masking a value in a log