System.Security.Principal.WindowsIdentity wi = System.Security.Principal.WindowsIdentity.GetCurrent();System.Security.Principal.WindowsPrincipal wp = new System.Security.Principal.WindowsPrincipal(wi);if (wp.IsInRole("Administrators")) MessageBox.Show(wp.Identity.Name + " is an Administrator!");