dnewsholme/PasswordState-Management

Suggestion: Change ConvertTo-PSCredential

colombeen opened this issue · 3 comments

Instead of using

Get-PasswordStatePassword -Search test | ConvertTo-PSCredential

Turning it into a method on the object which is returned

$Result = Get-PasswordStatePassword -Search test
$Result.GetPSCredential()

Or maybe even Type Conversion

[PSCredential] (Get-PasswordStatePassword -Search test)

My personal preference would be to use the latter, using type conversion (but i'm not sure if it's even possible to do this easily)

A method would definitely be doable, type conversion will need some investigation. I'll pick this up and have a look/investigation.

#57 contains the implementation for this.

Closed by #57