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


This topic is now archived and is closed to further replies.

  • Create New...