获取Active Directory组的成员 [英] Get members of an Active Directory group

查看:91
本文介绍了获取Active Directory组的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我想获取特定Active Directory组中所有成员的用户名.

I want to get all member's usernames in a particular Active Directory group.

我已经尝试了大约十二种在网上找到的代码示例
但它们都返回这样的结果(我正在转换为CSV)...

I have tried about a dozen code samples I've found online
but they all return results like this (I'm converting to CSV) ...

CN = Joe Smith,OU = IT,OU = Users,OU = Atlanta,DC = blah,DC = com,CN = Frank Anders,OU = IT,OU = Users,OU = Atlanta,DC = blah,DC = com等...

CN=Joe Smith,OU=IT,OU=Users,OU=Atlanta,DC=blah,DC=com,CN=Frank Anders,OU=IT,OU=Users,OU=Atlanta,DC=blah,DC=com, etc...

我只希望返回用户名:

jsmith,fanders,sguy,bmarley等...

jsmith,fanders,sguy,bmarley, etc...

有人可以帮我吗?

谢谢!
标记

Thanks!
Mark

推荐答案

当我想获取安全组的成员时,这是一段代码.

Here's a piece of code, I found, when I wanted to get the members of security groups.

代码段


这篇关于获取Active Directory组的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆