Skip to main content

Remove-KeldorSecret

SYNOPSIS

Removes a Keldor secret.

SYNTAX

Remove-KeldorSecret [-Name] <String> [[-Vault] <String>] [-Provider <String>] [-Field <String>] [-Force]
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Removes a secret from exactly one Keldor secret provider. Auto provider selection detects where the secret exists and fails if the target is ambiguous.

EXAMPLES

EXAMPLE 1

Remove-KeldorSecret -Name GitHubToken -Provider SecretManagement -Vault DevOps -Force

Removes the GitHubToken secret from the DevOps SecretManagement vault.

EXAMPLE 2

Remove-KDSecret -Name 'GitHub Token' -Provider Environment -PassThru -Force

Removes the process-scoped KELDOR_SECRET_GITHUB_TOKEN environment variable by using the Remove-KDSecret alias.

PARAMETERS

-Name

Specifies the secret or provider item name.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Vault

Specifies the optional provider vault or container 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 selects one provider only when the secret exists in exactly one provider.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: Auto
Accept pipeline input: False
Accept wildcard characters: False

-Field

Specifies a provider field to remove. Only providers that support field-level removal accept this parameter.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

Suppresses interactive confirmation prompts while still honoring ShouldProcess and WhatIf.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PassThru

Returns a non-sensitive result object describing the removal.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
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

None. Returns Keldor.SecretRemovalResult when PassThru is specified.

NOTES

Alias: Remove-KDSecret Environment provider removals are process scoped and do not remove values configured outside the current PowerShell process.

ALIASES

Remove-KDSecret

PLATFORM APPLICABILITY

Windows, macOS, and Linux.

POWERSHELL COMPATIBILITY

See PowerShell compatibility for the supported runtime policy. PowerShell 7.6 LTS is preferred.

https://docs.keldor.dev/powershell/keldor/Remove-KeldorSecret