< Back

New-PasswordStateRandomPassword

Sat Jan 18, 2020 6:39 pm

NAME New-PasswordStateRandomPassword



SYNOPSIS

Generate a random password from PasswordState.





SYNTAX

New-PasswordStateRandomPassword -ApiKey <PSCredential> [-UseV6Api] [-Endpoint <String>] [-Quantity <Int32>]

[-AlphaSpecial <Boolean>] [-WordPhrases <Boolean>] [-MinLength <Int32>] [-MaxLength <Int32>] [-LowerCase

<Boolean>] [-UpperCase <Boolean>] [-Numeric <Boolean>] [-HigherAlphaRatio <Boolean>] [-AmbiguousChars <Boolean>]

[-SpecialChars <Boolean>] [-SpecialCharList <String>] [-BracketChars <Boolean>] [-BracketCharsList <String>]

[-NumberOfWords <Int32>] [-MaxWordLength <Int32>] [-PrefexAppend <String>] [-SeperateWords <String>] [-WhatIf]

[-Confirm] [<CommonParameters>]



New-PasswordStateRandomPassword -ApiKey <PSCredential> [-UseV6Api] [-Endpoint <String>] [-Quantity <Int32>]

-GeneratorId <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Generate a random password from PasswordState.





PARAMETERS

-ApiKey <PSCredential>

The password generator API key.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-UseV6Api [<SwitchParameter>]

PasswordState versions prior to v7 did not support passing the API key in a HTTP header but instead expected

the API key to be passed as a query parameter. This switch is used for backwards compatibility with older

PasswordState versions.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Endpoint <String>

The Uri of your PasswordState site. (i.e. https://passwordstate.local)



Required? false

Position? named

Default value (_GetDefault -Option 'api_endpoint')

Accept pipeline input? False

Accept wildcard characters? false



-Quantity <Int32>

The quantity of passwords to generate.



Required? false

Position? named

Default value 1

Accept pipeline input? False

Accept wildcard characters? false



-AlphaSpecial <Boolean>

Include Alphanumerics and special characters.



Required? false

Position? named

Default value True

Accept pipeline input? False

Accept wildcard characters? false



-WordPhrases <Boolean>

Include word phrases - a random word will be generated.



Required? false

Position? named

Default value True

Accept pipeline input? False

Accept wildcard characters? false



-MinLength <Int32>

Minimum length for alphanumercis and special characters.



Required? false

Position? named

Default value 8

Accept pipeline input? False

Accept wildcard characters? false



-MaxLength <Int32>

Maximum length for alphanumercis and special characters.



Required? false

Position? named

Default value 0

Accept pipeline input? False

Accept wildcard characters? false



-LowerCase <Boolean>

Include lowercase characters.



Required? false

Position? named

Default value True

Accept pipeline input? False

Accept wildcard characters? false



-UpperCase <Boolean>

Include uppercase characters.



Required? false

Position? named

Default value True

Accept pipeline input? False

Accept wildcard characters? false



-Numeric <Boolean>

Include numeric characters.



Required? false

Position? named

Default value True

Accept pipeline input? False

Accept wildcard characters? false



-HigherAlphaRatio <Boolean>

Include higher ratio of alphanumerics vs special characters.



Required? false

Position? named

Default value True

Accept pipeline input? False

Accept wildcard characters? false



-AmbiguousChars <Boolean>

Include ambiguous characters - such as I, l, and 1.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-SpecialChars <Boolean>

Include special characters.



Required? false

Position? named

Default value True

Accept pipeline input? False

Accept wildcard characters? false



-SpecialCharList <String>

List of special characters - such as !#$%^&*+/=_-.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-BracketChars <Boolean>

Include brackets.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-BracketCharsList <String>

List of brackets - such as \\ \\ {}<>.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NumberOfWords <Int32>

The number of words to include.



Required? false

Position? named

Default value 3

Accept pipeline input? False

Accept wildcard characters? false



-MaxWordLength <Int32>

Maximum word length to generate.



Required? false

Position? named

Default value 8

Accept pipeline input? False

Accept wildcard characters? false



-PrefexAppend <String>

P to Prefix the Word, A to Append and I to Insert.



Required? false

Position? named

Default value P

Accept pipeline input? False

Accept wildcard characters? false



-SeperateWords <String>

Separate the generated Words with S for Spaces, D for Dashes and N for No Separation.



Required? false

Position? named

Default value D

Accept pipeline input? False

Accept wildcard characters? false



-GeneratorId <Int32>

Password generate policy Id from PasswordState.



Required? true

Position? named

Default value 0

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Do not generate a random password, just show -WhatIf message.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Confirm action before executing.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- EXAMPLE 1 --------------------------



New-PasswordStateRandomPassword



Generate a new random password with defaults

-------------------------- EXAMPLE 2 --------------------------



New-PasswordStateRandomPassword -Quantity 10



Generate 10 random passwords

-------------------------- EXAMPLE 3 --------------------------



New-PasswordStateRandomPassword -Quantity 10 -WordPhrases $false -MinLength 20



Generate 10 random passwords without word phrases and a minimum length of 20 characters.

-------------------------- EXAMPLE 4 --------------------------



New-PasswordStateRandomPassword -WordPhrases $false -MinLength 20 -UpperCase $true -LowerCase $false



Generate a random password without word phrases, a minimum length of 20 characters and only uppercase characters.

-------------------------- EXAMPLE 5 --------------------------



New-PasswordStateRandomPassword -MinLength 20 -NumberOfWords 2



Generate a new random password that is at least 20 characters longs and uses two words.



RELATED LINKS