< Back

New-Passphrase

Sat Jan 18, 2020 6:38 pm

NAME New-Passphrase



SYNOPSIS

Generates a new random passphrase.





SYNTAX

New-Passphrase [[-AmountOfWords] <Int32>] [[-AmountOfNumbers] <Int32>] [[-AmountOfSpecials] <Int32>] [[-Separator]

<Char>] [-AsObject] [-Confirm] [-IncludeNumbers] [-IncludeSpecials] [-IncludeUppercase] [-WhatIf]

[<CommonParameters>]



New-Passphrase [[-AmountOfNumbers] <Int32>] [[-AmountOfSpecials] <Int32>] [[-Separator] <Char>] [-AsObject]

[-Confirm] -CustomString <String> [-IncludeNumbers] [-IncludeSpecials] [-IncludeUppercase] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

Generates a new random passphrase. Choose how many words, if you want to include an uppercase word, if you want to

include numbers and/or special characters and how many of each.





PARAMETERS

-AmountOfNumbers <Int32>

Amount of numbers to include



Required? false

Position? 1

Default value 1

Accept pipeline input? False

Accept wildcard characters? false



-AmountOfSpecials <Int32>

Amount of special characters to include



Required? false

Position? 2

Default value 1

Accept pipeline input? False

Accept wildcard characters? false



-AmountOfWords <Int32>

Amount of words to get



Required? false

Position? 0

Default value 3

Accept pipeline input? False

Accept wildcard characters? false



-AsObject [<SwitchParameter>]

Return passphrase as passphrase object



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-CustomString <String>

Custom string to build passphrase object from



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-IncludeNumbers [<SwitchParameter>]

Includes numbers



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-IncludeSpecials [<SwitchParameter>]

Include special characters



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-IncludeUppercase [<SwitchParameter>]

Include an uppercase word



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Separator <Char>

Separator to use between words



Required? false

Position? 3

Default value " " (whitespace)

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



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

System.Int32, System.Char, System.String







OUTPUTS

System.String, System.Management.Automation.PSObject







NOTES









-------------------------- Example 1 --------------------------



PS C:\\> New-Passphrase



Generates a new all lowercase passphrase with default values, 3 words and whitespace as separator.

-------------------------- Example 2 --------------------------



PS C:\\> New-Passphrase -Separator "-"



Generates a new all lowercase passphrase with 3 words and dash (-) as separator.

-------------------------- Example 3 --------------------------



PS C:\\> New-Passphrase -AmountOfWords 5 -Separator "-" -IncludeNumbers -AmountOfNumbers 2 -IncludeUppercase | clip



Generates a new passphrase with 5 words, dash (-) as separator with 2 numbers, one uppercase word and pipes the

ouput to clipboard.

-------------------------- Example 4 --------------------------



PS C:\\> New-Passphrase -AmountOfWords 5 -Separator "-" -IncludeNumbers -AmountOfNumbers 2 -IncludeUppercase

-IncludeSpecials -AmountOfSpecials 2



Generates a new passphrase with 5 words, dash (-) as separator with 2 numbers, 2 special characters and one

uppercase word.

-------------------------- Example 5 --------------------------



PS C:\\> New-Passphrase -AmountOfWords 5 -Separator "-" -IncludeNumbers -AmountOfNumbers 2 -IncludeUppercase

-IncludeSpecials -AmountOfSpecials 2 -AsObject



Generates a new passphrase object with 5 words, dash (-) as separator with 2 numbers, 2 special characters and one

uppercase word. This object can then be manipulated further.



RELATED LINKS