Functions

PowerShell is King – New-VIARandomPassword

Long time ago i needed a function that creates random passwords that can be used when creating accounts, we have been using this for a long time, a few minutes ago Johan Arwidmark asked where the script is. The answer is, it is in one of the modules that I have on GitHub

Link to the module: https://github.com/DeploymentBunny/Functions/blob/master/VIAUtilityModule.psm1

You download it, import it an then you have a new command

New-VIARandomPassword

Import-Module C:\Setup\Functions\VIAUtilityModule.psm1
New-VIARandomPassword -PasswordLength 15
New-VIARandomPassword -PasswordLength 15 -Complex $true

 

image

Very easy to use, you can select to do it standard or complex and if you need many of them just loop it.

/mike

Categories: Functions, PowerShell

Tagged as: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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