Forum Discussion
rameshm443
Aug 18, 2021Copper Contributor
Run PowerShell with different credentials without prompt on remote machines
I want to run the below command using different user (domain\administrator) without prompting to enter password, basically I want to append the credentials in this command if required. powershell...
pvanberlo
Aug 18, 2021MCT
Perhaps starting the PowerShell session using Start-Process with the -Credential option works for you? This should allow you to pass both a username and password to run the process under.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.1
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.1