title: Run elevated powershell command from command prompt
body: <pre><code>powershell.exe Start-Process powershell.exe "set-executionpolicy" -Verb runAs
  </code></pre>
  
  <p>The above command will run a powershell window as admin and execute the command before it, however, if I want to make it say <code>set-executionpolicy bypass</code>, it will error out. How can I pass this parameter through the top command?</p>
  
  <p>Below is the error I get when I pass said parameter:</p>
  
  <pre><code>    Start-Process : A positional parameter cannot be found that accepts argument
  'bypass'.
  At line:1 char:1
  + Start-Process powershell.exe set-executionpolicy bypass -Verb runAs
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidArgument: (:) [Start-Process], ParameterB
     indingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell
     .Commands.StartProcessCommand
  </code></pre>