I have used following command for my automation task. But it is throwing exception like below,
parameter set cannot be resolved
Command I used:
Start-Process -FilePath powershell.exe -NoNewWindow -ArgumentList $code -verb RunAs
How to run the powershell commands in same command prompt ? and how to track that logs.
Each
-Verb
and-NoNewWindow
parameters belong to different parameter sets ofStart-Process
cmdlet. For more information about parameter sets, readand see Cmdlet Parameter Sets in the Cmdlet Parameters MSDN article.
Observe the following self-explicating results: