Get-SecretVault

查找并返回已注册的保管库信息。

语法

Default (默认值)

Get-SecretVault
    [[-Name] <String[]>]
    [<CommonParameters>]

说明

此 cmdlet 查找并返回有关已注册保管库的信息。 默认情况下,它将返回每个已注册保管库的信息。

示例

示例 1

Get-SecretVault
VaultName  ModuleName                        IsDefaultVault
---------  ----------                        --------------
CredMan    Microsoft.PowerShell.CredManStore False
LocalStore Microsoft.PowerShell.SecretStore  True

此示例运行命令而不使用任何参数返回所有已注册保管库的信息。 将显示 LocalStore 保管库设置为默认保管库。

示例 2

Get-SecretVault -Name LocalStore | Format-List -Property *
Name            : LocalStore
ModuleName      : Microsoft.PowerShell.SecretStore
ModulePath      : C:\Users\User01\Documents\PowerShell\Modules\Microsoft.PowerShell.SecretStore
Description     : Personal secrets for non-production use.
VaultParameters : {}
IsDefault       : True

此示例显示有关 LocalStore 保管库的其他信息。

参数

-Name

指定保管库的名称。 此 cmdlet 仅获取具有指定名称的保管库的信息。 输入名称或名称模式。 允许使用通配符。

如果未指定 Name 参数,则此 cmdlet 将返回所有已注册保管库的信息。

参数属性

类型:

String[]

默认值:None
支持通配符:True
不显示:False

参数集

(All)
Position:0
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

None

输出

Microsoft.PowerShell.SecretManagement.SecretVaultInfo