Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Get-ADGroupMember runing issue

$
0
0

Hi guys

I am just trying some basic AD scripts, but got some problem with Get-ADGroupMember

I am trying to get a list of users in a group, including every subgroup in that group. Then I want to display samaccountname, Full Name and group they are in.

Tried to run some basic command 

import-module activedirectory

Get-ADGroupMember "Domain Admins" -recursive | Select-Object Name,samaccountname

When executed, I get this:

Get-AdGroupMember : A parameter cannot be found that matches parameter name 'recursive'.
At E:\scripts\testAD.ps1:2 char:35
+ Get-ADGroupMember "Domain Admins" -recursive | Select-Object Name,samaccountname
+                                  ~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-AdGroupMember], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Get-AdGroupMember

How do I get it to work? Using PS 3


Viewing all articles
Browse latest Browse all 15028

Trending Articles