• 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 / Modules Cmdlets / Get-DictionaryFile

Get-DictionaryFile

24/09/2018 by Stephanos Leave a Comment

Get-DictionaryFile

Description

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

Note: You need to install DictionaryFile module version 2.0 in order for this cmdlet to be available. For more information, see PowerShell Module DictionaryFile v2.0.

Syntax:

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

If you want to find more about the specific cmdlet while you are in PowerShell you can use the below to get the help file.

Code:

Get-Help New-DictionaryFile

Output:

PowerShell Module DictionaryFile v2.0 - Get-Help - Get-DictionaryFile

Now lets see few examples about Get-DictionaryFile.

[adinserter name=”In Article”]

Examples

Example 1

In this example we will create passwords for the characters set “a,b,c,1,$” with minimum number of characters of two and maximum number of characters five. Generated passwords will be saved in C:\Scripts_Output\MyFile.txt.

PS C:\> Get-DictionaryFile -Path C:\Scripts\DictionaryFile.txt
aa
ab
ac
ba
bb
bc
ca
cb
cc

Example 2

For this example we are using the same characters set as example 1 but we will include also the capital letters. Generated passwords will be saved in C:\Scripts_Output\MyFile.txt.

PS C:\> "C:\Scripts\DictionaryFile.txt" | Get-DictionaryFile
aa
ab
ac
ba
bb
bc
ca
cb
cc

Example 3

Here we will see that we will have only the capital letters of our character set. Generated passwords will be saved in C:\Scripts_Output\MyFile.txt.

PS C:\> Get-DictionaryFile -Path "C:\Scripts\DictionaryFile.txt" | ForEach-Object {$_ + "a"}
aaa
aba
aca
baa
bba
bca
caa
cba
cca

Example 4

For this example instead of using the characters one by one. I am providing the whole alphabet. Generated passwords will be saved in C:\Scripts_Output\MyFile.txt.

PS C:\> "C:\Scripts\DictionaryFile.txt" | Get-DictionaryFile | Where-Object {$_ -like "*b*"}
ab
ba
bb
bc
cb

[adinserter name=”In Article”]

Required Parameters

  • -Path 
    • Required: True
    • Position: 1
    • Default value: None
    • Accept pipeline input: True (ByValue)
    • Accept wildcard characters: False

Inputs

System.String.

Get-DictionaryFile can accept a string value to determine the path of the dictionary file.

Outputs

System.Array.

Get-DictionaryFile will provide the passwords that where included in the dictionary file in an array.

[adinserter name=”In Article”]

Related Links

  • PowerShell Module DictionaryFile v 2.0
  • Get-PasswordCombination
  • Get-PasswordNumber
  • New-DictionaryFile
  • PowerShell Gallery | DictionaryFile 2.0
  • GitHub – SConstantinou/DictionaryFile

[adinserter name=”Matched-Content”]

Summary
Get-DictionaryFile
Article Name
Get-DictionaryFile
Description
Get-DictionaryFile. This is the help information about Get-DictionaryFile cmdlet and its use. Stephanos Constantinou Blog
Author
Stephanos
Publisher Name
Stephanos Constantinou Blog
Publisher Logo
Stephanos Constantinou Blog

Filed Under: Modules Cmdlets Tagged With: DictionaryFile Module

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