As a Powershell User, I want to be able to use pipelines to retrieve credentials and perform various manipulations using the secrets cmdlets to be more efficient
ValueByPropertyName should be added to name and vault properties at a minimum
Cmdlets should be sensitive to the type of piped object, for instance:
Get-SecretsVault 'builtinlocalvault' | Get-SecretInfo - Would recognize that it is a [SecretsVaultInfo] and bind the pipeline to the Vault parameter
'Test' | Get-SecretInfo - Would default strings and unknown types to the [String]Name parameter.
Objects like [SecretsVaultInfo] should have a .ToString() implemented that changes them to their vault name, so they can be coerced to the [String]$Vault parameter on Get-Secret if passed as a parameter e.g.
$myvault = Get-SecretsVault Get-Secret 'mysecret' -vault $myvault
Summary of the new feature/enhancement
As a Powershell User, I want to be able to use pipelines to retrieve credentials and perform various manipulations using the secrets cmdlets to be more efficient
Examples:
Get-SecretInfo 'MyTestSecret' | Get-Secret
Get-Secret 'MyTestSecret' | Add-Secret -Name 'MyTestSecretDuplicate'
Get-SecretsVault 'builtinlocalvault' | Get-SecretInfo | where typename -eq 'String' | Get-Secret
Get-SecretsVault 'builtinlocalvault' | Get-Secret 'mysecret'
Get-AzureVMKeyVaultName | Get-SecretsVault | Get-Secret 'myAzureKeyVaultSecret'
Proposed technical implementation details (optional)
Get-SecretsVault 'builtinlocalvault' | Get-SecretInfo
- Would recognize that it is a[SecretsVaultInfo]
and bind the pipeline to the Vault parameter'Test' | Get-SecretInfo
- Would default strings and unknown types to the [String]Name parameter.$myvault = Get-SecretsVault Get-Secret 'mysecret' -vault $myvault