title: Run Powershell script via batch file with elevated privileges
body: <p>I need to run a Powershell script to create AD user via a batch file. The thing is I need to run this PS script with elevated privileges (domain admin account). I have tried to script a '.bat' file which encloses all this information but I have been unsuccessful so far. Here is the script :</p>
  
  <pre><code>echo off
  cls
  echo Sign in with your ADM ID
  set /p username=
  
  powershell -noprofile -command "&amp;{ start-process powershell -ArgumentList '-
  noprofile -file C:\Users\...\Desktop\Powershell_scripts\New-ADuser\New-
  Aduser_test.ps1' -verb RunAs}"
  </code></pre>
  
  <p>I have tried with line /netonly /user:adm@domain but It won't work.</p>
  
  <p>Do you guys have any idea?</p>
  
  <p>Thanks in advance.</p>