Can ssomebody help ti run new process in the same window??
$credential = Get-Credential
Start-Process powershell.exe -Credential $credential -NoNewWindow -ArgumentList ".\ListScript.ps1" -Wait
Write-Host "Press any key to continue ..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
-NoNewWindow doesn't work, but without -Credential $credential it works fine.. How can I fix that?