Skip to main content

New-Password

SYNOPSIS

SYNTAX

Simple (Default)

New-Password [-Count <Int32>] [-ReturnSecureStringObject] [-AllowInterchangableCharacters]
[-SkipCompromisedCheck] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Random

New-Password [-Count <Int32>] [-ReturnSecureStringObject] [-AllowInterchangableCharacters]
[-SkipCompromisedCheck] [-Random] [-Length <Int32>] [-Signs <Int32>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

diceware

New-Password [-Count <Int32>] [-ReturnSecureStringObject] [-AllowInterchangableCharacters]
[-SkipCompromisedCheck] [-Diceware] [-WordCount <Int32>] [-CustomFirstWord <String>]
[-CustomWordSeparator <Char>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Function that generates passwords

The first characters is a captial consonant letter The second character is a lower vowel letter The third character is a lower consonant letter The fourth character is lower vowel letter The remaining four characters are digits.

This structure creates a password that is easy to remember but is less secure. What makes the password easier to remember is that the most character combinations are reasonably easy to prenounce. These password should only be used temporary. An few examples might be:

Wodi6380 Jaki2830 Kezo2617

EXAMPLES

EXAMPLE 1

New-Password -Diceware -WordCount 5 -Count 3

robust.dawn\condense/poet#cost parchment\parcel:remedy:ultra'triage spelling,moonedpropeller%legwarmerflagstick

EXAMPLE 2

New-Password -Diceware -WordCount 5 -Count 3 -CustomFirstWord 'gardin'

gardin\throwback"chirping#remake"poem gardin#juvenile!putt\jittery.palatable gardin'astonish\decaf"imprudent?specimen

EXAMPLE 3

New-Password -Count 3

Wuba9710 Suve0945 Zigo1479

This example uses the method to create a password that is easy to remember but less secure.

EXAMPLE 4

New-Password -Length 10 -Signs 5

..&La:J%NF

This example creates a password of alphanumrerical characters including five signs/symbols.

EXAMPLE 5

New-Password -Length 20

J.rp318xVD?Twhah'K7b

This example creates a password of alpanumerical+signs characters

PARAMETERS

-Count

Defines the number of passwords to generate. This can be used to create batches of passwords. Defaults to 1.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False

-ReturnSecureStringObject

Return password as secure string

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-AllowInterchangableCharacters

Defines that characters as i|I and l|L and 0|O can be used in the password, defaults to false

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SkipCompromisedCheck

By default each generated password is check against the "have i been pawned" database. To disable this check specify this parameter. Note that the complete hash of the password is never sent, only the first 5 chars of the password hash is sent. The API then returns all known hashed that begin with those 5 chars. The check if the full hash exists in the returned list is performed locally. For more information see the help for the cmdlet Test-PasswordAgainstPwnedPasswordService.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Random

Create a randomly generated password

Type: SwitchParameter
Parameter Sets: Random
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Length

When the parameter set random is used this parameter lets the user select how long the password should be. Defaults to 8.

Type: Int32
Parameter Sets: Random
Aliases:

Required: False
Position: Named
Default value: 12
Accept pipeline input: False
Accept wildcard characters: False

-Signs

When the parameter set random is used this parameter lets the user select how many signs/symbols that should be included in the password. Defaults to 3.

Type: Int32
Parameter Sets: Random
Aliases:

Required: False
Position: Named
Default value: 3
Accept pipeline input: False
Accept wildcard characters: False

-Diceware

Defines that a diceware password should be generated

Type: SwitchParameter
Parameter Sets: diceware
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WordCount

Defines how many words the diceware password should made up of

Type: Int32
Parameter Sets: diceware
Aliases:

Required: False
Position: Named
Default value: 4
Accept pipeline input: False
Accept wildcard characters: False

-CustomFirstWord

Optionally define a custom first word of the diceware series.

Type: String
Parameter Sets: diceware
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomWordSeparator

Optionally set a custom separator char when generating diceware

Type: Char
Parameter Sets: diceware
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

EDIT THIS DOC

This page was auto-generated from the powershell command comment based help. To edit the content of this page, update the script file comment based help on github Github