devblackops / PasswordState

PowerShell module for interacting with ClickStudio's PasswordState password management application
Apache License 2.0
40 stars 14 forks source link

Find-PasswordStatePassword does not map username for search #3

Closed Claustn closed 8 years ago

Claustn commented 8 years ago

Expected Behavior

When you use Find-PasswordStatePassword I would expext to be able to search for Username, but it seems that it is not possible, if you supply it, it will return everything from a list.

It seems as if you have accidentally omitted Username as a search parameter (Missing when you build the URI string)

Current Behavior

Possible Solution

if ($PSBoundParameters.ContainsKey('Username')) {
        $params += "&Username=$Username"
    }

Steps to Reproduce (for bugs)

  1. Find-PasswordStatePassword -ApiKey $ADUserListCred -PasswordListId 49 -Username 'gris' 2. 3. 4.

    Context

I am trying to check if password allready exists before creating new one

I allready have an outstanding Pull request, where I have added some more functionality, I have allready fixed this in my current branch, I can do a pull request as well if you prefer that.

Your Environment