< Back

New-Password

Sat Jan 11, 2020 2:45 pm

NAME New-Password



SYNOPSIS

This function generates a new password.





SYNTAX

New-Password -numberOfCharacters <Int32> [-minLowercaseCharacters <Int32>] [-minUppercaseCharacters <Int32>]

[-minDigits <Int32>] [-minSpecialCharacters <Int32>] [-specialCharacters <PSObject[]>] [<CommonParameters>]





DESCRIPTION

This function generates a new password.

This function is superior to [System.Web.Security.Membership]::GeneratePassword() as it is able

to guarantee a minimum number of lowercase characters, uppercase characters and digits.





PARAMETERS

-numberOfCharacters <Int32>

The number of characters in the password.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-minLowercaseCharacters <Int32>

The minimum number of lowercase characters in the password.

Set to -1 to indicate no lowercase characters should be present in the password.



Required? false

Position? named

Default value 1

Accept pipeline input? false

Accept wildcard characters? false



-minUppercaseCharacters <Int32>

The minimum number of uppercase characters in the password.

Set to -1 to indicate no uppercase characters should be present in the password.



Required? false

Position? named

Default value 1

Accept pipeline input? false

Accept wildcard characters? false



-minDigits <Int32>

The minimum number of numerical digits in the password.

Set to -1 to indicate no numerical digits should be present in the password.



Required? false

Position? named

Default value 1

Accept pipeline input? false

Accept wildcard characters? false



-minSpecialCharacters <Int32>

The minimum number of special characters in the password.

Set to -1 to indicate no special characters should be present in the password.



Required? false

Position? named

Default value 1

Accept pipeline input? false

Accept wildcard characters? false



-specialCharacters <PSObject[]>

A list containing the special characters to use.

If this parameter is provided, it will be used as the special character set,

instead of the default special character set.



Required? false

Position? named

Default value

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





RELATED LINKS