PowerShell script: Random password generator

Source: Internet
Author: User
Tags generator

Script Name: s random password generator _v2.63.ps1
Script function: Generate random password. Each password character number, password number, save the location and so on can be customized.
Script usage:
The script is hard-coded, so you need to open the script and modify the following variables:
Total number of generated passwords = 1000
$ per password digit = 12
$ Disk directory = ' e:\ script ps\log_ps\ '
$ large file with drive letter = ' F:\ '
and save, and then run the script, the script runs slower, can narrow the PowerShell window, and after n minutes go to the "$ save directory" to charge the generated password
File "lowercase plus digital plus special symbol password. txt", "case-plus-numeric-password. txt", "lowercase plus numeric password. txt".
Tip: Enter the drive letter + path +s+<tab> key, the name of the automatic completion of the script.

Http://files.cnblogs.com/files/piapia/getpwd_v2.63.zip


------"Scripting Features"------

Don't ask for the quickest, but the truth is random.

Pseudo-Random number:
Random passwords are actually a combination of random numbers, and. NET random numbers are generated very quickly, but also pseudo-random numbers. Python's random number function
It's also pretty fast, but it's just a pseudo-random number. All generated are pseudo-random numbers.

True random number:
It is impossible to generate true random numbers, only "take" the true random number.

The best of this script:
I have written several versions of random password generation, beginning with the "Call library, generate pseudo-random number" method. Then I found the "take true Random number" method, I could not help but to praise me ah, hehe.

You can customize random characters:

For example: In the random number generated by this script generator, the default is no 0,1, I, l,o these easily confusing letters.

Open source, no back door.

Script disadvantage: Slow.

------"Scripting principles, Processes"------

The script will first use dir your "$ large file with the drive letter". This step is slow , no permission will be error message I did not close, the purpose is intuitive.
Find the 10 largest files defined by "Large file type", which default to "*.rmvb", "*.mkv", "*.mp4", "*.avi"
Yes, it is " take the true random number from the big movie file "!
Randomly select one of the files, according to a certain number of rules, and then combined into a fixed-length password, and then randomly scrambled order,
Then, according to whether there are numbers, special symbols, discard the random number of non-conforming.


------"Final Recommendation"------

It is recommended that you replace your account with potential leaks within 5 years. If you can't change your account, you must log in (use) 1 times within 5 years.
Over 5 years do not Exchange accounts, the bank card does not log on the money, there may be no. Even the country has changed the style of money for 10 years and 8 years.
PowerShell Missionary original article 2016-02-06 permitted reprint, but must retain the name and provenance, otherwise investigate legal liability

It is recommended to change the password every year, or to change the password in less time. Passwords must be complex, and passwords in different accounts will never be the same.

The complex password is written on the computer and then encrypted. Copy 3 copies, put them in different places, and update every six months.

I script new "Gray Main cow Privacy Notepad" is being created, please look forward to ...

PowerShell script: Random password generator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.