Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (test-path \\servername\ortak\$env:computername.txt)
- {#doNothing} else
- {
- $punc = 46..46
- $digits = 48..57
- $letters = 65..90 + 97..122
- $YouShallNotPass = get-random -count 15 `
- -input ($punc + $digits + $letters) |
- % -begin { $aa = $null } `
- -process {$aa += [char]$_} `
- -end {$aa}
- net user administrator $YouShallNotPass
- “OK” | out-file \\servername\ortak\$env:computername.txt
- $env:computername | out-file \\servername\ortak\list.txt -append
- }
Advertisement
Add Comment
Please, Sign In to add comment