Last active
June 24, 2018 07:29
-
-
Save nyanshiba/d765fc9b6f7b5563d29fd7bd6058b4ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /p length=文字数: | |
set /p ask=1=数、3=英数、4=英数記号: | |
powershell -NoProfile -ExecutionPolicy Unrestricted -Command "& { switch ("%ask%") {"1" {$characters='123456789'}"3" {$characters='abcdefghkmnprstuvwxyzABCDEFGHKLMNPRSTUVWXYZ123456789'}"4" {$characters='abcdefghkmnprstuvwxyzABCDEFGHKLMNPRSTUVWXYZ123456789!$^&/()=?*+#_'}}; -join ${characters}[(1..%length% | ForEach-Object { Get-Random -Maximum ${characters}.length })] }" | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment