The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Posts Tagged ‘Functions’

PowerShell is King – New-VIARandomPassword

Posted by Mikael Nystrom on April 6, 2017

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

Posted in Functions, PowerShell | Tagged: , | Leave a Comment »