<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tinyint.com &#187; enumerate members</title>
	<atom:link href="http://www.tinyint.com/index.php/tag/enumerate-members/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tinyint.com</link>
	<description>An engineering and development &#60;em&#62;Factory of Knowledge&#60;/em&#62;™</description>
	<lastBuildDate>Mon, 09 Aug 2010 19:41:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Enumerate Distribution Groups Script Updated&#8230;</title>
		<link>http://www.tinyint.com/index.php/2009/07/17/enumerate-distribution-groups-script-updated/</link>
		<comments>http://www.tinyint.com/index.php/2009/07/17/enumerate-distribution-groups-script-updated/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 18:29:02 +0000</pubDate>
		<dc:creator>tcnolan</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[enumerate members]]></category>
		<category><![CDATA[get-distributiongroupmember]]></category>

		<guid isPermaLink="false">http://www.tinyint.com/?p=97</guid>
		<description><![CDATA[A reader sent in a question asking how to enumerate groups that have spaces in them and this lead me to realize I didn&#8217;t follow the specifications for valid distinguished names as well as I thought I had.  If you take a look at RFC 2253 and the Microsoft page that defines security group names, [...]]]></description>
			<content:encoded><![CDATA[<p>A reader sent in a question asking how to <a href="http://www.tinyint.com/index.php/2009/05/24/enumerate-distribution-group-members/" target="_self">enumerate groups</a> that have spaces in them and this lead me to realize I didn&#8217;t follow the specifications for valid distinguished names as well as I thought I had.  If you take a look at <a href="http://www.ietf.org/rfc/rfc2253.txt" target="_blank">RFC 2253</a> and the Microsoft page that <a href="http://technet.microsoft.com/en-us/library/cc776019%28WS.10%29.aspx" target="_blank">defines security group names</a>, you will see what the allowed characters are for these names.  At this point the validation is a lot better, but it still isn&#8217;t perfect.</p>
<p>If you encounter a situation where you need to enumerate members of a group that my validation does not allow, you can scroll down to line 271 in the script and change the $rx variable to &#8220;.+&#8221; to make it simple which will allow you to pass any characters.  If you pass invalid characters you will get some funny errors happening, but it should work.  You may have to use quotes around the name if you are looking to use spaces or other allowed special characters.</p>
<p>Taking another look at the code, I also found a small bug that was causing the display of notes associated with a group to print out an error about null strings.  This should be fixed now.  If anyone notices any other problems, feel free to comment and let me know and I will try to fix it or add in the change as soon as possible.  I&#8217;ll be posting another update soon that goes the other direction of this script, one that enumerates group membership for a specific user.</p>
<p>Thanks again to Darren from Brisbane(?), Australia for pointing this out.</p>
<p>Here is the updated script download link: <a href="http://www.tinyint.com/wp-content/plugins/download-monitor/download.php?id=3">enumerate_groups.ps1</a><a href="/wp-content/uploads/2009/05/enumerate_groups.ps1"></a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.tinyint.com%2Findex.php%2F2009%2F07%2F17%2Fenumerate-distribution-groups-script-updated%2F&amp;linkname=Enumerate%20Distribution%20Groups%20Script%20Updated%26%238230%3B"><img src="http://www.tinyint.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.tinyint.com/index.php/2009/07/17/enumerate-distribution-groups-script-updated/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enumerate Distribution Group Members</title>
		<link>http://www.tinyint.com/index.php/2009/05/24/enumerate-distribution-group-members/</link>
		<comments>http://www.tinyint.com/index.php/2009/05/24/enumerate-distribution-group-members/#comments</comments>
		<pubDate>Sun, 24 May 2009 21:27:30 +0000</pubDate>
		<dc:creator>tcnolan</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[distribution group]]></category>
		<category><![CDATA[enumerate members]]></category>
		<category><![CDATA[get-distributiongroupmember]]></category>

		<guid isPermaLink="false">http://www.tinyint.com/?p=39</guid>
		<description><![CDATA[Note: Script updated on 2009/07/17 to fix two bugs.  Read more here: http://www.tinyint.com/index.php/2009/07/17/enumerate-distribution-groups-script-updated/ In my organization, we make use of many different groups to separate departments and sub-groups of each department, and many groups build off of this. We also make use of Dynamic Distribution Groups to make things a bit easier on the admin [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small;"><span style="font-family: Calibri;">Note: Script updated on 2009/07/17 to fix two bugs.  Read more here: <a href="http://www.tinyint.com/index.php/2009/07/17/enumerate-distribution-groups-script-updated/">http://www.tinyint.com/index.php/2009/07/17/enumerate-distribution-groups-script-updated/</a></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small;"><span style="font-family: Calibri;"><br />
In my organization, we make use of many different groups to separate departments and sub-groups of each department, and many groups build off of this.<span style="mso-spacerun: yes;"> </span>We also make use of Dynamic Distribution Groups to make things a bit easier on the admin side of things.<span style="mso-spacerun: yes;"> </span>When tasked with cleaning up these distribution groups and making them easier to manage, it was a bit difficult determining who was supposed to receive mail for what group.<span style="mso-spacerun: yes;"> </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-family: Calibri; font-size: small;">This is because the Get-DistributionGroupMember cmdlet doesn’t have a parameter like –expand which will give you all of the child groups and their members as well.<span style="mso-spacerun: yes;"> </span>If you have a group called “Engineering” which then has 4 child groups for each department and then each of those groups has each individual mailbox, when you perform “Get-DistributionGroupMember -Identity Engineering”, you will only see the four child groups, not each member of those as well.<span style="mso-spacerun: yes;"> </span>This became a big issue because of how much we rely on sub-groups in our organization, and after a lot of investigation it turned out there was no way to do this built in directly to any cmdlet, so I wrote a script that would do this for me.  If you need to recursively enumerate distribution group members you are unfortunately out of luck with built in cmdlets.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-family: Calibri; font-size: small;">There are a number of scripts out there that serve a similar purpose as the one I have created, but most do not handle mail contacts or dynamic distribution groups, so I figured if I am going to have to add functionality, I might as well write it myself from the ground up.<span style="mso-spacerun: yes;"> </span>So now, if you are ever in need of getting child members of a distribution group you can use this script to help you out.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-family: Calibri; font-size: small;">One nice feature here is if you specify “-showTree” as a parameter, it will display a treeview of all the groups.<span style="mso-spacerun: yes;"> </span>Without -showtree it will just grab all child members and display them in a flat view.<span style="mso-spacerun: yes;"> </span>The script is pretty long because I included help text that displays if you run the script without any parameters, and for that reason I am just posting it as a download link.<span style="mso-spacerun: yes;"> </span>Hope this helps a few people out there who went through the same trouble I did finding out that there is no built in way to do this!</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-family: Calibri; font-size: small;"><br />
</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small;"><span style="font-family: Calibri;">Download Link: </span></span><a href="http://www.tinyint.com/wp-content/plugins/download-monitor/download.php?id=3">enumerate_groups.ps1</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.tinyint.com%2Findex.php%2F2009%2F05%2F24%2Fenumerate-distribution-group-members%2F&amp;linkname=Enumerate%20Distribution%20Group%20Members"><img src="http://www.tinyint.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.tinyint.com/index.php/2009/05/24/enumerate-distribution-group-members/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
