< Back

Set-Secret

Sat Jan 18, 2020 9:52 pm

NAME Set-Secret



SYNOPSIS

Create or update a Secret





SYNTAX

Set-Secret [-VaultObject] <PSObject> [-Path] <String> [-Secret] <Object> [<CommonParameters>]





DESCRIPTION

This will set the contents of a Secret.





PARAMETERS

-VaultObject <PSObject>

The Object containing Vault access details.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

The Path to the Secret as you would pass to Vault Read.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Secret <Object>

The Secret. This will be converted to JSON. A simple Hash works best.



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Set-Secret -VaultObject $vault -Path secret/new -Secret @{value="secret"}



PS C:\\> Get-Secret $vault secret/new



value

-----

secret











RELATED LINKS