• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Stephanos Constantinou Blog

PowerShell Scripting

  • Home
  • Blogs
    • PowerShell Tutorials
    • PowerShell Scripts
    • PowerShell Modules
      • Modules Cmdlets
    • Software Reviews
  • About
  • Contact
You are here: Home / PowerShell Modules / PowerShell Module DictionaryFile v 2.0

PowerShell Module DictionaryFile v 2.0

24/09/2018 by Stephanos Leave a Comment

PowerShell Module DictionaryFile v 2.0

PowerShell Module DictionaryFile has been updated to version 2.0. The module has been redesigned to include more functionality with better inputs and outputs. We will go though the module to help you understand what you are able to do with it.

Module Description

PowerShell Module DictionaryFile v 2.0 will create all password combinations that you are able to have using a specific character set. Using this module you will be able to find number of all password combinations. You are able to create the combinations either on the screen or use them with other cmdlets in your scripts. Also, you are able to create a dictionary file, containing the generated passwords. If you have already generated a password file, you are able to import the file that you have already created and process its data by using the output with other cmdlets in your scripts.

In v 2.0 the module has the following cmdlets:

  • Get-PasswordNumber
  • Get-PasswordCombination
  • New-DictionaryFile
  • Get-DictionaryFile 

Install DictionaryFile Module

To install the module you need to use the below:

Code:

Install-Module -Name DictionaryFile

To import the module use the below:

Code:

Import-Module -Name DictionaryFile

The module is Auto-import enabled so there is not need to import it every time you need to use any of the cmdlets.

Update DictionaryFile Module

If you have already installed DictionaryFile module before and you want to update it to the latest version, use the below:

Code:

Update-Module -Name DictionaryFile

[adinserter name=”In Article”]

Get-PasswordNumber

Get-PasswordNumber will calculate the number of possible passwords that you are able to generate based on your input and parameters. You can use this command to know beforehand what is the expected output when you want to create a dictionary file. It will provide you the number of combinations before you go and create them on screen or in a dictionary file. The cmdlet has a help file also so you can find more information about it.

Syntax:

Get-PasswordNnumber
    [-CharacterSet <String> or "alphabet"]
    [-MinCharacters <uint32>]
    [-MaxCharacters <uint32>]
    [-IncludeCapital]
    [-CapitalOnly]
    [<CommonParameters>]

For more information about this cmdlet, see Get-PasswordNumber.

Get-PasswordCombination

Get-PasswordCombination creates all possible passwords based on the character set and parameters that you will use and provides the results in the output. If you will not pipe the results in another cmdlet, the generated password will appear in console.

Syntax:

Get-PasswordCombination
    [-CharacterSet] <String>
    [-MinCharacters] <UInt32>
    [-MaxCharacters] <UInt32>
    [-IncludeCapital]
    [-CapitalOnly]
    [<CommonParameters>]

For more information about this cmdlet, see Get-PasswordCombination.

[adinserter name=”In Article”]

New-DictionaryFile

New-DictionaryFile creates all possible passwords based on the character set and parameters that you will use and saves those passwords in a text file.

Syntax:

New-DictionaryFile
    [-CharacterSet] <String>
    [-MinCharacters] <UInt32>
    [-MaxCharacters] <UInt32>
    [-IncludeCapital]
    [-CapitalOnly]
    [-Path] <String>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

For more information about this cmdlet, see New-DictionaryFile.

Get-DictionaryFile

Syntax:

Get-DictionaryFile
    [-Path] <String>
    [<CommonParameters>]

For more information about this cmdlet, see Get-DictionaryFile.

[adinserter name=”In Article”]

Examples

Example 1

In this example we will see the number of passwords that we are able to generate when we will have a character set of “a,b,c,1,2,3,$*&” . We define also that we need the passwords to be minimum 2 characters and maximum 5.

Code:

Get-PasswordNumber -CharacterSet "a,b,c,1,2,3,$,*,&" -MinCharacters 2 -MaxCharacters 5

Output:

PowerShell Module DictionaryFile v2.0 - Get-PasswordNumber

Example 2

For our second example we create all combinations that we are able to have using “a,b,c” character set with minimum characters 1 and maximum characters 2.

Code:

PS C:\> Get-PasswordCombination -CharacterSet "a,b,c" -MinCharacters 1 -MaxCharacters 2

Output:

PowerShell Module DictionaryFile v2.0 - Get-PasswordCombination

Example 3

Using Get-DictionaryFile, we are able to retrieve the values of a previously created file.

Code:

PS C:\> Get-DictionaryFile -Path C:\Scripts\DictionaryFile.txt

Output:

PowerShell Module DictionaryFile v2.0 - Get-DictionaryFile

[adinserter name=”In Article”]

Tests and Timings

As the number of possible passwords increases exponentially, the time to create the passwords is also increased exponentially. The below screen shot shows one of the tests to find out the time that is needed to get the results.

The specifications of the PC that I run the tests are:

  • CPU: Intel Core i7-3770K@4.60GHz
  • RAM: 16 GB
  • OS: Windows 10 1803
  • PowerShell Version: 5.1

PowerShell Module DictionaryFile v2.0 - Timings

Hope you like DictionaryFile module.

You feedback is appreciated.

If you have any questions or anything else please let me know in the comments below.

[adinserter name=”In Article”]

Related Links

  • Get-DictionaryFile
  • New-DictionaryFile
  • Get-PasswordNumber
  • Get-PasswordCombination
  • PowerShell Scripts
  • PowerShell Tutorials
  • PowerShell Gallery | DictionaryFile 2.0
  • GitHub – SConstantinou/DictionaryFile
  • Install-Module – Microsoft Docs
  • PowerShell Arithmetic Operators
  • Import-Module – Microsoft Docs
  • PowerShell Comparison Operators
  • Get-Help – Microsoft Docs
  • Add-Content – Microsoft Docs
  • ForEach-Object – Microsoft Docs
  • New-Alias – Microsoft Docs
  • about_For | Microsoft Docs
  • New-Item – Microsoft Docs
  • about_If | Microsoft Docs
  • about_Switch | Microsoft Docs
  • Out-Null – Microsoft Docs
  • Remove-Item – Microsoft Docs
  • about_Throw | Microsoft Docs
  • Select-Object – Microsoft Docs
  • Split-Path – Microsoft Docs
  • Test-Path – Microsoft Docs
  • Write-Output – Microsoft Docs
  • Write-Warning – Microsoft Docs
  • Publish-Module – Microsoft Docs
  • New-ModuleManifest – Microsoft Docs

[adinserter name=”Matched-Content”]

Summary
PowerShell Module DictionaryFile v 2.0
Article Name
PowerShell Module DictionaryFile v 2.0
Description
PowerShell Module DictionaryFile v 2.0. In this article you will find information about PowerShell Module DictionaryFile v 2.0 and its use. Stephanos Constantinou Blog
Author
Stephanos
Publisher Name
Stephanos Constantinou Blog
Publisher Logo
Stephanos Constantinou Blog

Filed Under: PowerShell Modules Tagged With: Add-Content, Arithmetic Operators, Comparison Operators, DictionaryFile Module, ForEach-Object, Get-Help, Import-Module, Install-Module, New-Alias, New-Item, New-ModuleManifest, Out-Null, PowerShell For, PowerShell ForEach, PowerShell If, PowerShell Switch, PowerShell Throw, Publish-Module, Remove-Item, Select-Object, Split-Path, Test-Path, Write-Output

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Footer

Recent Posts

  • ICS Cube Product Review 26/04/2019
  • PowerShell Module SysInfo v1.2.0 15/03/2019
  • PowerShell Module SysInfo v1.1.2 13/11/2018
  • PowerShell Module SysInfo 24/10/2018
  • Get-VoltageProbe 24/10/2018
  • Get-VideoController 24/10/2018
  • Get-USBController 24/10/2018
  • Get-TrackPoint 24/10/2018
  • Get-TrackBall 24/10/2018
  • Get-TouchScreen 24/10/2018
Planet PowerShell

Categories

  • Modules Cmdlets (57)
  • PowerShell Modules (5)
  • PowerShell Scripts (38)
  • PowerShell Tutorials (35)
  • Software Reviews (2)

Archives

  • April 2019 (1)
  • March 2019 (1)
  • November 2018 (1)
  • October 2018 (56)
  • September 2018 (13)
  • August 2018 (9)
  • July 2018 (6)
  • June 2018 (8)
  • May 2018 (7)
  • April 2018 (9)
  • March 2018 (4)
  • February 2018 (6)
  • January 2018 (12)
  • December 2017 (4)
Top 10 PowerShell 2018

Blogroll

  • Planet PowerShell
  • Reddit – PowerShell
  • PowerShell Magazine
  • PowerShell.org
  • PowerShell Team Blog
  • Hey, Scripting Guy! Blog
  • Mike F Robbins
  • PowerShell Explained with Kevin Marquette
  • Mike Kanakos – Network Admin
  • The Lonely Administrator
  • AskME4Tech
PowerShell Blogs Sysadmin Blogs Banners for Top 20 Programming Blogs

© 2023 · Stephanos Constantinou Blog

  • Home
  • Blogs
  • About
  • Contact