This topic contains 14 replies, has 4 voices, and was last updated by
October 23, 2015 at 7:09 am #31234
I have been trying to get a list of members to an AD Security Group. I have tried every combination I can think of but nothing is working. It all comes back with no results. I think the problem is that my group name has (BCC) in it. For example the group name is "Family members – including non clients (BCC)". I am trying to export the list of active directory members to this group to a csv file. I have used get-adgroup and piped that into get-adgroupmember and piped that into export-csv. I have used get-adgroupmember in many different combination. I have also used a couple of my commands with a different group and it gives me a partial list of members for that group. I have aslo tried get-adgroup -Identity "GUID"
I have used as simple of cmds as 'Get-ADGroupmember -identity "Family Members – Including Non Clients (BCC Only)" ' Just to get the list to display on the screen and that didn't even work. It did not give me an error but it did not return any results either.
I am totally out of ideas. Anyone can help that would be great.
October 23, 2015 at 7:50 am #31241
What happened when you type this in?
Get-ADGroupMember 'GroupName' | Select-Object name
If you get a list of users, as you should..you can than export | export-csv C:\somefile.csv
October 23, 2015 at 8:38 am #31246
It just returned to the PS command prompt with no results and no errors.
October 23, 2015 at 8:40 am #31247
have you tried different groups? I am assuming the group is not empty?
October 23, 2015 at 8:42 am #31248
Group is not empty. and I just tried your command with another group and the same thing happened.
I just tried your command with a different group then the previous two groups and it gave names.
Does it matter that the members in the security group are contacts? They are not users but they are contacts.
Carrie A Gale.
October 23, 2015 at 10:26 am #31257
can you run this please?
I am thinking that you might have too many objects in it, and its causing issues.
let's see if it can get a count!
sorry I am also working trying to respond when I can.
October 23, 2015 at 10:33 am #31258
I got a reply of 0.
But in AD Users and Computers there are tons of contact names under the Members tab
Do I need to put the server name in there?
October 23, 2015 at 10:37 am #31259
Sorry, enter your group between the quotes, that was a local group for me! sorry!
Also, I am assuming you have appropriate permissions?
October 23, 2015 at 10:38 am #31260
I entered my groups and included the -server name and it still returns a 0
which makes no sense because there is probably 100 contacts in this Global Security Group.
Other groups with less contacts seem to give me results but not this group or other groups this big.
I am a Domain Admin on this domain
October 23, 2015 at 12:35 pm #31275ParticipantPoints: 0Rank: Member
Yes, it absolutely matters that the group members are contacts. Get-ADGroupMember only returns user objects unfortunately. You should be able to get what you want using Get-ADObject however.
Get-ADObject -filter "cn -eq 'groupname'" -Properties member | select -ExpandProperty Member
October 23, 2015 at 1:26 pm #31279
OH WOW, Thanks so much. This has been driving me crazy but your command works great.
October 23, 2015 at 2:01 pm #31280ParticipantPoints: 0Rank: Member
NP, but I do need to retract part of my previous statement. Get-ADGroupMembers returns User and Computer objects, but not Contacts. Just for clarification.
October 26, 2015 at 3:59 am #31307
can you tell me what cn-eq means in the command?
October 26, 2015 at 4:38 am #31309ParticipantPoints: 0Rank: Member
'cn' refers to the Common-Name of the AD object, in this case a group
'-eq' equal to
October 26, 2015 at 4:57 am #31311
Thank you Tim E Lane
The topic ‘Get-ADGroupmember showing no results.’ is closed to new replies.