Keeper-Security/keeper-sdk-dotnet

PowerCommander - Custom Fields

Closed this issue · 4 comments

Not really an issue here but I couldn't figure out a way to add multiple custom fields when creating a new record and I was wondering if there is a way to do that when using the Add-KeeperRecord.

For example:

Add-KeeperRecord -Title 'Test Record' -Login 'Test User' -password 'Test Password' -URL 'WWW.Test.com' -Custom 'Name1:TestCust1' 'Name2:TestCust2'

Thanks,

Ma Xiong

get-help Add-KeeperRecord -detailed

   Add-KeeperRecord [-Title] <String> [-UpdateOnly] [-Login <String>] [-GeneratePassword] [-Password <String>] [-URL
    <String>] [-Custom <String[]>] [-Notes <String>] [<CommonParameters>]

    -Custom <String[]>
        Comma-separated list of key:value pairs.
        Example: -Custom "name1:value1, name2:value2"

I've tried the above and instead of creating new custom fields, It adds them all into the first one.

Here is the code I tried.
Add-KeeperRecord -Title 'Test Record' -Login 'TESTUSERNAME'
-Password 'TESTPASSWORD' -URL 'WWW.URL.COM'
-Custom "Cust1:TestCust1, Cust2:TestCust2, cust3:TestCust3"

Below is the screenshot of the record created in Keeper
image

Add-KeeperRecord "Record Title" -UpdateOnly -Custom a:b, c:d works fine
-Custom parameter accepts array of strings.
-Custom "Cust1:TestCust1, Cust2:TestCust2, cust3:TestCust3" - incorrect. a string value
-Custom "Cust1:TestCust1", "Cust2:TestCust2", "cust3:TestCust3" - correct. array of strings

Thank you for clarifying that up!