By David Wiseman (Administrator)Created 04 Jun 2012, Modified 05 Jun 2012
My Rating:
Vote
Rating:
Not Rated
Views:9604
Downloads:39
Source:

Random Password Generator

Language:  PowerShell

Compatibility

Windows XP Unknown Windows 2003 Unknown
Windows 2000 No Windows NT No
Vista Unknown Windows 2008 Yes
Description

Generate a random password using PowerShell


Notes
The password is generated using random numbers from the System.Random class.  A more secure implementation using random numbers generated from the RNGCryptoServiceProvider class can be found here
Code

Line Numbers: On  Off      Plain Text
# Length of the password to be generated
$PasswordLength = 20

# Used to store an array of characters that can be used for the password
$CharPool = New-Object System.Collections.ArrayList
# Add characters a-z to the arraylist
for ($index = 97; $index -le 122; $index++) { [Void]$CharPool.Add([char]$index) }
# Add characters A-Z to the arraylist
for ($index = 65; $index -le 90; $index++) { [Void]$CharPool.Add([Char]$index) }
# Add digits 0-9 to the arraylist
$CharPool.AddRange(@("0","1","2","3","4","5","6","7","8","9"))
# Add a range of special characters to the arraylist
$CharPool.AddRange(@("!","""","#","$","%","&","'","(",")","*","+","-",".","/",":",";","<","=",">","?","@","[","\","]","^","_","{","|","}","~","!"))

$password=""
$rand=New-Object System.Random

# Generate password by appending a random value from the array list until desired length of password is reached
1..$PasswordLength | foreach { $password = $password + $CharPool[$rand.Next(0,$CharPool.Count)] }	

#print password
$password

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      

Posted On: 9/28/2018 7:16:38 AM

jinyi928 pandora charms moncler outlet ugg boots outlet longchamp basketballl shoes adidas shoes bottega veneta mbt shoes supreme clothing coach outlet lacoste polo coach outlet christmas presents off white jordan adidas nmd longchamp outlet canada goose outlet canada goose outlet louboutin shoes canadian goose clarks outlet michael kors outlet skechers shoes new balance shoes canada goose moncler outlet coach outlet true religion salomon shoes off white shoes clarks outlet james harden shoes ray ban sunglasses ralph lauren polo pandora champion sportswear tory burch outlet coach outlet kate spade outlet michael kors outlet mlb jerseys nike tn ralph lauren polo oakley sunglasses true religion jeans champion clothing christian louboutin outlet christian louboutin shoes adidas superstar clarks shoes ralph lauren polo red bottom shoes pandora jewelry ralph lauren uk red bottom shoes moncler outlet canada goose jackets coach outlet coach outlet online canada goose outlet coach outlet converse trainer ecco shoes nike outlet superdry uk coach outlet online ugg outlet clearance canada goose outlet kate spade handbags adidas yeezy coach outlet jordan uk canada goose jacket hermes belt hogan shoes jordans ray ban sunglasses supreme ray ban sunglasses ray ban sunglasses true religion jeans outlet north face coach handbags ugg boots off white clothing canada goose ralph lauren polo christian louboutin shoes ralph lauren uk canada goose clothing coach outlet ugg outlet boots coach factory outlet air max 90 christian louboutin outlet christian louboutin off white outlet ugg outlet jordan shoes pandora charms asics shoes nike shoes outlet christian louboutin outlet moncler jackets ed hardy uk fitflops clearance ugg boots christian louboutin outlet michael kors outlet canada goose outlet pandora outlet tod's outlet manolo blahnik canada goose outlet red bottom shoes nike shoes salomon shoes nike blazers coach outlet dsquared2 ralph lauren fitflops clearance north face true religion jeans canada goose jackets pandora jewelry true religion jeans outlet jordans louboutin shoes asics shoes coach outlet nhl jersey jordan clothing yeezy boots 350 nike shoes nike shoes coach outlet online nike outlet factory jordan 8 fitflops clearance ralph lauren polo jordan shoes canada goose outlet jordan 4 adidas yeezy giuseppe zanotti kate spade outlet true religion canada goose nike clothing louboutin shoes nike air max mbt shoes issey miyake ferragamo belt air max 90 ultra boost 3.0 birken stock moncler outlet ugg boots canada goose outlet moncler outlet moncler jackets hogan shoes coach factory outlet louboutin shoes stussy ugg boots clearance true religion jeans soccer shoes pandora outlet pandora charms ugg boots ecco shoes canada goose outlet kate spade outlet jordan shoes nba jerseys reebok outlet adidas clothing louboutin shoes michael kors outlet fitflops clearance adidas clothing vibram five fingers coach outlet ray ban sunglasses nike shoes fidget spinner ralph lauren polo christian louboutin pandora jewelry coach outlet online pandora charms clarks shoes christian louboutin coach outlet coach outlet factory coach outlet kate spade outlet moncler jacket ugg outlet canada goose outlet mbt shoes ugg outlet ferragamo shoes valentino shoes red bottom shoes christian louboutin shoes pandora outlet prada handbags ralph lauren polo moncler outlet coach factory outlet coach outlet christian louboutin shoes kate spade outlet michael kors outlet ralph lauren polo longchamp outlet ralph lauren uk hermes belt coach outlet adidas outlet hugo boss kate spade nike shoes canada goose outlet hugo boss louboutin shoes jordan shoes prada shoes ugg boots clearance christian louboutin outlet supreme clothing ugg outlet air max 90 dsquared2 christian louboutin outlet christian louboutin nike huarache coach factory outlet

daisyjane2018
Posted On: 11/9/2018 1:28:01 AM

The league announced the news this morning, writing in a press release that,cheap authentic jerseys "Beginning Friday, November 9, NFL team 'outfits' will be available in the cheap nfl jerseys Shop. This unique opportunity will give Fortnite players the ability to purchase and customize up to eight outfits representing their favorite NFL teams."cheap jerseysWe're just getting started, though! There will also be "football-themed emotes, harvesting tools, gliders, and even a referee outfit." cheap sports jerseys Even a referee outfit! cheap jerseys from chinaSo there you have it, Fortniters (Fortnitees?). Your prayers have been answered. Everyone gets their favorite team's football jersey,wholesale jerseys and themed emotes, and harvesting tools, and gliders. Click here to choose the new cheap authentic jerseys from china and wholesale nfl jerseys! Receive comprehensive coverage of the Bears and stream the ‘Football Aftershow’ easily on your device.click here cheap authentic nfl jerseys.It's not a giant surprise,custom cowboys jersey but it's still impressive to see. Fortnite is hugely popular among professional athletes, and it's football season,discount jerseys after all. Epic Games just announced an official partnership with the NFL to bring licensed jerseys to the popular battle royale game, letting players don the jerseys of their favorite teams as they blast each other into oblivion.discount nfl jerseys cheap nfl jerseys cheap jerseys cheap jerseys from china wholesale jerseys cheap nfl jerseys from china china jerseys nfl jerseys china wholesale nfl jerseys cheap authentic nfl jerseys cheap jerseys online cheap authentic jerseys cheap sports jerseys cheap wholesale jerseys china wholesale jerseys discount nfl jerseys cheap authentic jerseys from china discount jerseys custom cowboys jersey Click here GOOGLE FACKBOOK Amazon nfl jerseys cheap cheap college football jerseys cheap nfl jerseys china cheap football jerseys custom jerseys cheap cheap nfl gear cheap nfl authentic jerseys cheap jerseys nfl nfl football jerseys cheap cheap nfl football jerseys cheap nfl jerseys free shipping cheap nfl nike jerseys custom nfl jerseys cheap nfl cheap jerseys