我正在编写一个脚本,以获取当前用户的AD组的列表,并创建一个路径的.txt文件。using System.DirectoryServices; using System.DirectoryServices.AccountManagement;UserPrincipal user = UserPrincipal.FindByIdentity(new PrincipalContext(ContextType.Domain, "<Domain>"), IdentityType.SamAccountName,