$currentPass = Get-Content .\aaa.txt Write-Output $currentPass $newPass1 = Read-Host -Prompt "Dej haslo mam horego admina" while($newPass1 -ne $newPass2) { $newPass2 = Read-Host -Prompt "Dej haslo mam horego admina x2" } $newPass1 | Out-File -FilePath .\aaa.txt Get-Content .\aaa.txt