I found this really simple powershell script that will list all members of a
specified AD group. What I'd like to do is then pipe that to a text file.
Here's the script:
$root=([ADSI]"").distinguishedName
$Group = [ADSI]("LDAP://CN=xxx, CN=Users,"+ $root)
$Group.member
Now, this gives a nice, simple list of users in group xxx, but it is the FQDN
of the user. What I'd really like to do is kick out a list of just the user
name, without the CN= stuff. Also, once that list is kicked out, I'd like to
pipe that list into a text file, so I can e-mail it to a requestor.
Anyone know how to do this easily? (Complete scripting noob here, btw)
Thanks,
Joe
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin