This is an example of how you may go ahead and generate your own secure passwords. To do so, follow the steps below.
You need to either clone this script into your own git repository, and dot source it to gain access to its functions OR import this repository in Jenkins.
To dot source put this script next to the script you are dot sourcing from and run
. .\"New-Password.ps1"
The main and single function of this script is to generate secure passwords
Running New-Password
will return a 40 char long password as a secure string. This password has as minimum 2 lower case chars, 2 upper case chars, 2 digits and 2 special chars.
New-Password -Length 12 -AsString
New-Password -MinUppercaseChars 20
l
, i
and 1
New-Password -ForbiddenChars @("l", "i", "1")
As-String
Set to true
if you want output in clear-test
Length
Specifies the length of the outputted password
ForbiddenChars
MinLowercaseChars
MinLowercaseChars
MinLowercaseChars
<!-- CONTRIBUTING -->
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)<p align="right">(<a href="#top">back to top</a>)</p>
<!-- LICENSE -->
Distributed under the MIT License. See LICENSE.txt
for more information.
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- CONTACT -->
Your Name - @twitter_handle - email@email_client.com
Project Link: https://github.com/github_username/repo_name
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- ACKNOWLEDGMENTS -->
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->