当前位置:首页 > 资料夹 > 正文内容

导出AD Group 中用户列表

lepiaoxue2周前 (09-13)资料夹44

For groups whose members are more than 1000, membership cannot be extracted using the command Get-ADGroupMember as it will show only 1000 results.

In such cases, you need to run the below command :

 

Get-ADGroup $group -Properties Member | Select-Object -Expand Member | Get-ADUser -Property Name, DisplayName

 

In $group you can give the name of the group (under double quotes)

By default this command will look up for the group under A domain and all users which are in A domain will show up.

 

Let’s say there are members from the other domain also, in that case you need to use one more switch

 

Get-ADGroup $group -Properties Member | Select-Object -Expand Member | Get-ADUser -server B.com -Property Name, DisplayName

OR

Get-ADGroup $group -Properties Member | Select-Object -Expand Member | Get-ADUser -server C.com -Property Name, DisplayName

 

Similarly, if your group is in domain other than A, you can use the same switch in first command like below :

 

Get-ADGroup -server B.com $group -Properties Member | Select-Object -Expand Member | Get-ADUser -Property Name, DisplayName


版权声明:本文由乐飘雪发布,如需转载请注明出处。

本文链接:http://lepiaoxue.com/?id=18

相关文章

常见网页返回状态码(200、301、302、500等)

常见网页返回状态码(200、301、302、500等)

1XX系列:指定客户端应相应的某些动作,代表请求已被接受,需要继续处理。由于 HTTP/1.0 协议中没有定义任何 1xx 状态码,所以除非在某些试验条件下,服务器禁止向此类客户端发送 1xx 响应。2XX系列:代表请求已成功被服务器接收、理解、并接受。这系列中最常见的有200、201状态码。200...