【问题标题】:ActiveDirectory User RemoteControl tab details?Active Directory 用户远程控制选项卡详细信息?
【发布时间】:2013-06-28 13:41:44
【问题描述】:

我试图弄清楚如何从用户属性的“远程控制”选项卡中获取一些活动目录详细信息。

我可以使用类似于以下的代码找到其他详细信息:

            //modify this line to include your domain name
            string path = string.Format("LDAP://{0}", domain);

            //init a directory entry
            DirectoryEntry dEntry = new DirectoryEntry(path);

            //init a directory searcher
            DirectorySearcher directorySearcher = new DirectorySearcher(dEntry);

            directorySearcher.PropertiesToLoad.Add("samAccountName");
            directorySearcher.PropertiesToLoad.Add("displayName");
            directorySearcher.PropertiesToLoad.Add("cn");
            directorySearcher.PropertiesToLoad.Add("distinguishedName");

            directorySearcher.PropertiesToLoad.Add("objectCategory");
            directorySearcher.PropertiesToLoad.Add("objectSID");
            directorySearcher.PropertiesToLoad.Add("objectGUID");

            directorySearcher.PropertiesToLoad.Add("manager");

            directorySearcher.Filter = "(&(objectClass=user))";

            //perform search on active directory
            searchResults = directorySearcher.FindAll();

            //loop through results of search
            Parallel.ForEach<SearchResult>(searchResults.Cast<SearchResult>().ToList(), searchResult =>
            {
                // Any processing
            });

但我无法弄清楚远程信息的存储位置。通常我使用 ADSI Edit 并在修改属性时查找对属性的更改,但我没有注意到任何更改。谁能指出我正确的方向?

我应该提一下,我的领域功能级别和森林功能级别都是2003年。

【问题讨论】:

    标签: c# active-directory directoryentry directorysearcher


    【解决方案1】:

    在 Windows Server 2008(和 R2)中,终端服务终端服务器运行时接口从名为 userParameters 的用户 Active-Directory 属性中获取用户参数。正如Microsoft documentation 中的解释userParameter 包含作为blob 的终端服务器参数(查看USERCONFIG 结构)。


    已编辑:这在 W2K3 R2 上完全相同。

    这是在您选中或取消选中某些内容时查找属性差异的方法。我使用 LDIFDE.EXE 工具。

    ldifde -f c:\temp\ph1.ldf -d "ou=Monou,dc=societe,dc=fr" -r "sn=hocquet"
    

    我取消选中启用遥控器

    ldifde -f c:\temp\ph2.ldf -d "ou=Monou,dc=societe,dc=fr" -r "sn=hocquet"
    

    ph1.ldf 和 ph2.ldf 之间的比较给出。

    InputObject                                                                   SideIndicator
    -----------                                                                   -------------
    whenChanged: 20130703130209.0Z                                                =>
    uSNChanged: 168396                                                            =>
    userParameters::                                                              =>
     ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUAQaCAFDd... =>
     dQcmVzZW5045S15pSx5oiw44GiGAgBQ3R4Q2ZnRmxhZ3Mx44Cw44Gm44Cy44C5EggBQ3R4U2h... =>
     44Cw44Cw44Cw44CwKgIBQ3R4TWluRW5jcnlwdGlvbkxldmVs44Sw                         =>
    whenChanged: 20120124083342.0Z                                                <=
    uSNChanged: 163184                                                            <=
    

    【讨论】:

    • 谢谢。不幸的是,我使用的是 2003,它看起来不包含 userParameter 属性。
    • 对不起,我的错。我有两个相似的用户,我正在 ADUAC 中修改一个并在 ADSIEdit 中查看属性。因为我没有修改一个用户的属性,所以值不存在!
    猜你喜欢
    • 1970-01-01
    • 2017-01-28
    • 2023-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-13
    相关资源
    最近更新 更多