I am writing a project where I run a PowerShell script and create a new PSSession as follows:
PowerShell.exe -Command enter-pssession myUser -credential userName When I run this, it opens a dialog to prompt the user for a password. However, I would prefer for the user to be able to enter the password along with the rest of the above line instead of having to be bothered with the prompt. I'm very new to PowerShell, and everything I've found in docs only gives ways to bring the prompt up for the password. Is this something that is possible to accomplish in PowerShell? Thanks!