1 2 3 4 5 6 7 |
#Read user and password $user=Read-Host $pass=Read-Host #Read user.txt, example content: #user1,passwoasdfK$ Get-Content F:\power\users.txt | % {if(($_.split(",")[0] -like $user) -and ($_.split(",")[1] -like $pass)){"Login OK"}} |