Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Get StrongPassword

Dave edited this page Apr 23, 2016 · 1 revision

Get-StrongPassword

Synopsis

Generates a strong password

Syntax

Get-StrongPassword [-Length <Int32>] [-NumberOfSpecialCharacters <Int32>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]

Description

Generates a strong password based on the parameters provided

Parameters

-Length <Int32>

Length in Characters for the generated password to be.

Required? False
Position? named
Default value 10
Accept pipeline input? false
Accept wildcard characters? False

-NumberOfSpecialCharacters <Int32>

Number of special characters to include in the password, must be less than the length of the password

Required? False
Position? named
Default value 3
Accept pipeline input? false
Accept wildcard characters? False

-InformationAction <ActionPreference>

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-InformationVariable <String>

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 (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

Outputs

Notes

This cmdlet does not do a lot currently, it only really generates a password based on System.Web.Security.Membership.GeneratePassword().

Examples

Example 1

PS C:\> Get-StrongPassword
QTJ(T?wwe)

Generates a password 10 characters long with 3 special characters

Example 2

PS C:\> Get-StrongPassword  -Length 20 -NumberOfSpecialCharacters 5
zPN>C%.f/(l1aGq)n3Ze

Generates a password 20 characters long with 5 special characters

Related links