开发者

Searching Computer Names from AD in MOSS 2007

In MOSS 2007, I 开发者_开发百科want to search/get Computer Names from Active Directory in SharePoint just like search users.


Assuming you want to retrieve these names programmatically:

As far as I know there is no SharePoint API to retrieve computer names from the AD. Though there are methods on SPUtility to retrieve Users and Groups from the AD. To query computer names you have to implement you own Ldap query:

Use the .Net types System.DirectoryServices.DirectoryEntry / System.DirectoryServices.DirecorySearcher to query against the AD. If you were using .Net 3.5 you could use the types System.DirectoryServices.AccountManagement.ComputerPrincipal and System.DirectoryServices.AccountManagement.PrincipalSearcher to do so.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜