title: Running elevated Powershell by script is not working
body: <p>My Powershell script starts with the check if PS is running in elevated mode, if not it starts itself again in elevated mode. At my system it is running without problems. At another system the second shell starts and dies after a second. 
  Does someone know this problem or could give me a hint how to trouble shoot. No anti virus is active and execution policy is set by group policy.</p>
  
  <p>Here is the code (found somewhere on SO):</p>
  
  <pre><code>If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
  {
      Write-Host "Running elevated..."
      $arguments = "&amp; '" + $myinvocation.mycommand.definition + "'"
      Start-Process powershell -Verb runAs -ArgumentList $arguments
      Break
  }
  </code></pre>