Hi.
I'm trying to start a process with different credential. I type my password in the dialog box, and after, I got this error :
Start-process : This command cannot be run due to the error: Incorrect parameter.
When I run this simple command, it work (but with wrong credentials) :
Start-process C:\Windows\regedit.exe
But, as soon I add the parameter "-credential Mydomain\adminuser" I have this error...
I tried a lot and lot things and else... like :
$Credential = "Mydomain\useradmin" $Prog = "C:/Windows/Regedit.exe" $argList = @('-noprofile', "-command `"&{ & '$Prog' }`" ") Start-Process powershell -verb runas -ArgumentList $argList
$Credential = get-credential Start-process C:\Windows\regedit.exe -Credential $credentialAnd most other thing, but I always got this fucking error... I'm very disapointed, because I really don't understand why It refuse to run.
I'm tryied with only the "-verb runas" parameter, but it do not work too.
If someone have a solution for me, or any alternative command... :) I really need to do that in my office...
Thank's a lot