1
據到Windows 10賬戶和本地用戶和組應用程序,我的用戶帳戶是本地計算機上的本地Administrators組的成員,但是當我打電話以下幾點:的WindowsIdentity組不反映本地管理員身份
List<string> allGroupNames = new List<string>();
WindowsIdentity user = WindowsIdentity.GetCurrent();
foreach (var i in user.Groups)
{
allGroupNames.Add(i.Translate(typeof(NTAccount)).Value);
}
的allGroupNames列表不顯示我在任何種類的管理員組,當地或其他地方的。我收到50個多其他團體,包括BUILTIN\\users
和NT AUTHORITY\\Authenticated Users
但沒有反映管理狀態的計算機帳戶提示我有一個列表。
任何想法?
請在你的答案該鏈接的相關副本。 –