-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Metadata should be part of the default psformat for SecretInformation #109
Comments
Thanks @JustinGrote we chose not to do this by default because metadata can be long and may not output well in the table format, and is not one of the mandatory item, however we will track this feature request and also consider a switch on |
Thanks Sydney, I understand in default table format it may not be super legible and would be truncated with "..." often but I think it is important to expose that it is there so that a user can interrogate it further, otherwise it is fairly "hidden" unless a user is very familiar with Get-Member. Maybe take a "wait and see" approach if vaults widely adopt metadata or not, since changing the view format would probably not be a breaking change. I can say all of my vaults will have a use for metadata :) |
In the mean time, use a custom format file. <?xml version="1.0" encoding="UTF-8"?>
<!--
Format type data generated 04/14/2021 18:16:54 by PROSPERO\Jeff
This file was created using the New-PSFormatXML command that is part
of the PSScriptTools module.
https://github.com/jdhitsolutions/PSScriptTools
-->
<Configuration>
<ViewDefinitions>
<View>
<!--Created 04/14/2021 18:16:54 by PROSPERO\Jeff-->
<Name>meta</Name>
<ViewSelectedBy>
<TypeName>Microsoft.PowerShell.SecretManagement.SecretInformation</TypeName>
</ViewSelectedBy>
<TableControl>
<!--Delete the AutoSize node if you want to use the defined widths.-->
<AutoSize />
<TableHeaders>
<TableColumnHeader>
<Label>Name</Label>
<Width>7</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>Type</Label>
<Width>9</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>VaultName</Label>
<Width>12</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>Metadata</Label>
<Width>83</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Type</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>VaultName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Metadata</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration> Save the file and use |
@jdhitsolutions well obviously, this is more for new users of the module who don't even know the metadata is a thing and don't know they can do advanced filtering of secrets using Where-Object using it. If they know enough to do a custom type data then they know enough about Get-Member :) |
I wonder if metadata use is more module specific. The LastPass secrets module might use metadata differently than say the KeePass module than 1Password which might not use it at all. Perhaps commands to use metadata are the responsibility of the individual secretmanagement modules |
Metadata does not appear in the psformat xml for
[SecretInformation]
and should be present to let users know that it is there.The text was updated successfully, but these errors were encountered: