Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function random-password ($length = 15)
- {
- $alphabets= "abcdefghijklmnopqstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()"
- $char = for ($i = 0; $i -lt $alphabets.length; $i++) { $alphabets[$i] }
- $randpassword = ''
- for ($i = 1; $i -le 14; $i++)
- { $randpassword += $(get-random $char) }
- return $randpassword
- }
Advertisement
Add Comment
Please, Sign In to add comment