사용자 및 암호의 두 가지 범주로 해시 테이블을 만들려고합니다. 이것은 지금까지의 코드입니다. 그러나 문제는 출력이 명령을 표시하고 실행하지 않는다는 것입니다. 해시 테이블에 gc 출력 값
for ($i=1; $i -le 10; $i++){
$caps = [char[]] "ABCDEFGHJKMNPQRSTUVWXY"
$lows = [char[]] "abcdefghjkmnpqrstuvwxy"
$nums = [char[]] "2346789"
$spl = [char[]] "[email protected]#$%^&*?+"
$first = $lows | Get-Random -count 1;
$second = $caps | Get-Random -count 1;
$third = $nums | Get-Random -count 1;
$forth = $lows | Get-Random -count 1;
$fifth = $spl | Get-Random -count 1;
$sixth = $caps | Get-Random -count 1;
$pwd = [string](@($first) + @($second) + @($third) + @($forth) + @($fifth) + @($sixth))
Out-File C:\Users\Administrator\Documents\L8_userpasswords.txt -InputObject $pwd -Append
}
$here = @'
$users=Get-Content C:\\Users\\Administrator\\Desktop\\L8_users.txt
$passwords=Get-Content C:\\Users\\Administrator\\Documents\\L8_userpasswords.txt
'@
convertfrom-stringdata -stringdata $here
이
내가 무엇입니까 출력입니다 :PS C:\Users\Administrator> C:\Users\Administrator\Documents\l8.ps1
Name Value
---- -----
$users Get-Content C:\Users\Administrator\Desktop\Lab8_users.txt
$passwords Get-Content C:\Users\Administrator\Documents\L8_userpasswords.txt
: 동일한 수의 항목, 당신은 이런 일을 할 수 '이름 값 ---- ----- 값 {dV7a @ H, wT9x + U, bU3y @ Y, vC9s & R ...} 이름 {마이크 베이커, 메리 마틴, 우마 Siveram, 우리 Demisky ...}' – Musa
@ TazB. 해당 정보로 질문을 업데이트하십시오. 이 모든 것을 읽을 수있는 것은 아닙니다. –