Jump to content

Password Generator Policies


Recommended Posts

Hi there,


I have created passwordlists via API providing a password list template. The new lists work fine, but I realized that the Password Generator Policy is not being taken from the template. Instead the "Default Password Generator" policy is being used.

Is this a general problem?




Link to comment
Share on other sites

Never mind, the script worked in the customer's environment, so you can close the topic.

Here's my powershell function.


Function Add-PasswordList {

    if ($PasswordstateURL.EndsWith('/')) {

    if ($Passwordlist = Get-PasswordList -PasswordstateURL $PasswordstateURL -Passwordlistname $Passwordlistname) {
        Write-Error "Passwordlist with the name '$($Passwordlistname)' already exists"
        return $false

    $jsonData = @"
        "Description":"$($Passwordlistname)'s Passwords",

    $PasswordstateUrl = "$($PasswordstateURL)/winapi/passwordlists"
    $PasswordList = Invoke-Restmethod -Method Post -Uri $PasswordstateUrl -ContentType "application/json" -Body $jsonData -UseDefaultCredentials -UseBasicParsing
    return $PasswordList


$List = Add-PasswordList -PasswordstateURL $PasswordstateURL -Passwordlistname $PasswordStateUser.SamAccountName -PasswordlistTemplateID 13 -PasswordlistAdminGroupID 2 -PasswordGeneratorID 2

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...