Get-KeldorSecret
SYNOPSIS
Gets a Keldor secret.
SYNTAX
Get-KeldorSecret [-Name] <String> [[-Vault] <String>] [-Provider <String>] [-AsPlainText]
[<CommonParameters>]
DESCRIPTION
Gets a plaintext secret string from the first available configured provider. Auto provider selection tries OnePassword CLI, SecretManagement, and environment variables in that order.
EXAMPLES
EXAMPLE 1
Get-KeldorSecret -Name GitHubToken
Gets the GitHubToken secret using the first configured provider that can retrieve it.
EXAMPLE 2
Get-KDSecret -Name 'GitHub Token' -Provider Environment
Gets the KELDOR_SECRET_GITHUB_TOKEN environment variable by using the Get-KDSecret alias.
PARAMETERS
-Name
Specifies the secret or item name.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Vault
Specifies the optional provider vault name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Provider
Specifies the secret provider to use. Auto tries all supported providers in priority order.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Auto
Accept pipeline input: False
Accept wildcard characters: False
-AsPlainText
Returns the secret as plaintext. This switch is reserved for future compatibility because all current providers return plaintext strings.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
System.String
NOTES
Alias: Get-KDSecret
ALIASES
Get-KDSecret
PLATFORM APPLICABILITY
Windows, macOS, and Linux.
POWERSHELL COMPATIBILITY
See PowerShell compatibility for the supported runtime policy. PowerShell 7.6 LTS is preferred.