Get-SecretVault
尋找並傳回已註冊的保存庫資訊。
語法
Default (預設值)
Get-SecretVault
[[-Name] <String[]>]
[<CommonParameters>]
Description
此 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。