title: Universal test for Admin privileges
body: <p>Is there a single guaranteed method to test if the current user has admin rights? I have tried this</p>
  
  <pre><code>$isAdmin = (new-object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole("Administrators")
  </code></pre>
  
  <p>And it works, as long as Windows was originally installed in English. If Windows is installed in Spanish you have to test for Administra<strong>d</strong>ors. And there are a few other languages that work similarly.
  My first thought is to just test for all the possible spellings, but if there is something simple, elegant and foolproof, that would be my preference.</p>