![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Trying to get nested users from Distribution Lists in AD I am new to Powershell, but have been a Perl dev for many years. So, I'm familiar with what you can do with a script... I just don't know how to do it in Powershell. =) I've been tasked with providing a list of users that are part of the given distribution list. Here are my constraints: 1. This needs to be with Powershell as it's installed - no additional cmdlets (so I can't use Get-QADGroupMember) 2. I don't know how many DLs will be nested. I've tried searching around online, but everyone is using the cmdlet mentioned above, or the Exchange cmdlets. Since I don't have access to either, can this be done? Thanks! --Lareth |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Trying to get nested users from Distribution Lists in AD 2000 or 2003? If it is 2000 then your going to have to do the nested check yourself. If 2003 you can probably use ASQ. General Good Doc for Searches http://technet2.microsoft.com/Window...6ded41033.mspx Also, I have a blog series on LDAP filters http://bsonposh.com/archives/tag/LDAP-Filter and http://bsonposh.com/archives/tag/LDAP <kirgan.peacock@xxxxxx> wrote in message news:78328b70-d483-4f19-a312-e3f67075f5d5@xxxxxx Quote: >I am new to Powershell, but have been a Perl dev for many years. So, > I'm familiar with what you can do with a script... I just don't know > how to do it in Powershell. =) > > I've been tasked with providing a list of users that are part of the > given distribution list. Here are my constraints: > > 1. This needs to be with Powershell as it's installed - no additional > cmdlets (so I can't use Get-QADGroupMember) > 2. I don't know how many DLs will be nested. > > I've tried searching around online, but everyone is using the cmdlet > mentioned above, or the Exchange cmdlets. Since I don't have access > to either, can this be done? > > Thanks! > > --Lareth |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Trying to get nested users from Distribution Lists in AD Try this too: http://posh.jaykul.com/p/1156 --- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Quote: > I am new to Powershell, but have been a Perl dev for many years. So, > I'm familiar with what you can do with a script... I just don't know > how to do it in Powershell. =) > > I've been tasked with providing a list of users that are part of the > given distribution list. Here are my constraints: > > 1. This needs to be with Powershell as it's installed - no additional > cmdlets (so I can't use Get-QADGroupMember) > 2. I don't know how many DLs will be nested. > I've tried searching around online, but everyone is using the cmdlet > mentioned above, or the Exchange cmdlets. Since I don't have access > to either, can this be done? > > Thanks! > > --Lareth > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Trying to get nested users from Distribution Lists in AD We have 2003. Thank you - this returns all the nested users! I appreciate it very much! =) --Kirgan |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Trying to get nested users from Distribution Lists in AD If your at Win2k3 SP2, A more efficient way is to use the LDAP_MATCHING_RULE_IN_CHAIN defined here http://msdn.microsoft.com/en-us/library/aa746475.aspx $dn = "<groupdn>" $filter = "(memberof:1.2.840.113556.1.4.1941:=$dn)" $ds = new-object System.DirectoryServices.DirectorySearcher([ADSI]"",$filter) $ds.PageSize = 1000 $ds.FindAll() Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject K> We have 2003. Thank you - this returns all the nested users! I K> appreciate it very much! =) K> K> --Kirgan K> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Help - Email Addresses in Distribution Lists Messed Up | Vista mail | |||
| Distribution Lists in Windows Mail | Vista mail | |||
| Distribution Lists | Vista mail | |||
| Windows mail: Distribution Lists | Vista mail | |||
| Distribution lists/group lists | Vista mail | |||