|
| 1 | +--- |
| 2 | +document type: cmdlet |
| 3 | +external help file: SecretBackup-Help.xml |
| 4 | +HelpUri: '' |
| 5 | +Locale: en-US |
| 6 | +Module Name: SecretBackup |
| 7 | +ms.date: 03/23/2026 |
| 8 | +PlatyPS schema version: 2024-05-01 |
| 9 | +title: Export-Secret |
| 10 | +--- |
| 11 | + |
| 12 | +# Export-Secret |
| 13 | + |
| 14 | +## SYNOPSIS |
| 15 | + |
| 16 | +Exports secrets from a specified vault to a JSON file. |
| 17 | + |
| 18 | +## SYNTAX |
| 19 | + |
| 20 | +### __AllParameterSets |
| 21 | + |
| 22 | +``` |
| 23 | +Export-Secret [-VaultName] <string> [[-OutPath] <string>] [<CommonParameters>] |
| 24 | +``` |
| 25 | + |
| 26 | +## ALIASES |
| 27 | + |
| 28 | +This cmdlet has the following aliases, |
| 29 | + {{Insert list of aliases}} |
| 30 | + |
| 31 | +## DESCRIPTION |
| 32 | + |
| 33 | +This function exports secrets from a specified vault to a JSON file. |
| 34 | +It retrieves secret information from the vault and converts it to a JSON format for export. |
| 35 | + |
| 36 | +## EXAMPLES |
| 37 | + |
| 38 | +### EXAMPLE 1: Exports secrets from the 'MyVault' vault and saves the JSON file to the 'C:\Backups' directory. |
| 39 | + |
| 40 | +Export-Secret -VaultName 'MyVault' -OutPath 'C:\Backups' |
| 41 | + |
| 42 | +### EXAMPLE 2: Exports secrets from the 'MyVault' vault and saves the JSON file to the current location. |
| 43 | + |
| 44 | +Export-Secret -VaultName 'MyVault' |
| 45 | + |
| 46 | +## PARAMETERS |
| 47 | + |
| 48 | +### -OutPath |
| 49 | + |
| 50 | +Specifies the output path where the JSON file will be saved. |
| 51 | +If not provided, the current location will be used as the default output path. |
| 52 | + |
| 53 | +```yaml |
| 54 | +Type: System.String |
| 55 | +DefaultValue: (Get-Location).Path |
| 56 | +SupportsWildcards: false |
| 57 | +Aliases: [] |
| 58 | +ParameterSets: |
| 59 | +- Name: (All) |
| 60 | + Position: 1 |
| 61 | + IsRequired: false |
| 62 | + ValueFromPipeline: false |
| 63 | + ValueFromPipelineByPropertyName: false |
| 64 | + ValueFromRemainingArguments: false |
| 65 | +DontShow: false |
| 66 | +AcceptedValues: [] |
| 67 | +HelpMessage: '' |
| 68 | +``` |
| 69 | +
|
| 70 | +### -VaultName |
| 71 | +
|
| 72 | +Specifies the name of the vault from which to export secrets. |
| 73 | +This parameter is mandatory. |
| 74 | +
|
| 75 | +```yaml |
| 76 | +Type: System.String |
| 77 | +DefaultValue: '' |
| 78 | +SupportsWildcards: false |
| 79 | +Aliases: [] |
| 80 | +ParameterSets: |
| 81 | +- Name: (All) |
| 82 | + Position: 0 |
| 83 | + IsRequired: true |
| 84 | + ValueFromPipeline: false |
| 85 | + ValueFromPipelineByPropertyName: false |
| 86 | + ValueFromRemainingArguments: false |
| 87 | +DontShow: false |
| 88 | +AcceptedValues: [] |
| 89 | +HelpMessage: '' |
| 90 | +``` |
| 91 | +
|
| 92 | +### CommonParameters |
| 93 | +
|
| 94 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, |
| 95 | +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, |
| 96 | +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see |
| 97 | +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). |
| 98 | +
|
| 99 | +## INPUTS |
| 100 | +
|
| 101 | +## OUTPUTS |
| 102 | +
|
| 103 | +## NOTES |
| 104 | +
|
| 105 | +Exports secretes in plain text. |
| 106 | +Make sure you protect the exported data. |
| 107 | +
|
| 108 | +
|
| 109 | +## RELATED LINKS |
| 110 | +
|
| 111 | +{{ Fill in the related links here }} |
| 112 | +
|
0 commit comments