I have this code in powershell which works perfectly and now I am trying to rewrite it in c#.
$admin = ([Security.Principal.WindowsPrincipal] [Security.Princip