<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dmitry's PowerBlog: PowerShell and beyond &#187; one-liner</title>
	<atom:link href="http://dmitrysotnikov.wordpress.com/category/one-liner/feed/" rel="self" type="application/rss+xml" />
	<link>http://dmitrysotnikov.wordpress.com</link>
	<description>Dmitry Sotnikov's view on PowerShell, PowerGUI and everything he sees around</description>
	<lastBuildDate>Mon, 30 Nov 2009 11:00:31 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dmitrysotnikov.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/930c8793b5aed06d07140b3be0db9d23?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Dmitry's PowerBlog: PowerShell and beyond &#187; one-liner</title>
		<link>http://dmitrysotnikov.wordpress.com</link>
	</image>
			<item>
		<title>Find users in too many groups</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/10/12/find-users-in-too-many-groups/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/10/12/find-users-in-too-many-groups/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 10:00:48 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[cmdlets]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1575</guid>
		<description><![CDATA[Large Kerberos tokens (caused by too many groups listed in them) can be an issue in some environments (I&#8217;ve just had a similar trouble myself in an ADFS deployment). Luckily PowerShell is here to help. This quick script will list all users who are members of more than 75 groups:
$limit = 75
Get-QADUser -SizeLimit 0 -DontUseDefaultIncludedProperties [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1575&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Large Kerberos tokens (caused by too many groups listed in them) <a href="http://support.microsoft.com/kb/935744">can be an issue</a> in some environments (I&#8217;ve just had a similar trouble myself in an ADFS deployment). Luckily PowerShell is here to help. This quick script will list all users who are members of more than 75 groups:</p>
<pre><span style="color:#800080;">$limit</span><span style="color:#000000;"> </span><span style="color:#FF0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">75</span><span style="color:#000000;">
</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-SizeLimit</span><span style="color:#000000;"> </span><span style="color:#000000;">0</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-DontUseDefaultIncludedProperties</span><span style="color:#000000;"> |
  </span><span style="color:#5F9EA0;font-weight:bold;">ForEach-Object</span><span style="color:#000000;"> {
    </span><span style="color:#800080;">$groups</span><span style="color:#000000;"> </span><span style="color:#FF0000;">=</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">Get-QADGroup</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-ContainsIndirectMember</span><span style="color:#000000;"> </span><span style="color:#800080;">$_</span><span style="color:#000000;">.DN </span><span style="color:#5F9EA0;font-style:italic;">-SizeLimit</span><span style="color:#000000;"> </span><span style="color:#800080;">$limit</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">`</span><span style="color:#000000;">
      </span><span style="color:#5F9EA0;font-style:italic;">-DontUseDefaultIncludedProperties</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-WarningAction</span><span style="color:#000000;"> </span><span style="color:#800000;">SilentlyContinue</span><span style="color:#000000;">
    </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (</span><span style="color:#800080;">$groups</span><span style="color:#000000;">.Count </span><span style="color:#FF0000;">-ge</span><span style="color:#000000;"> </span><span style="color:#800080;">$limit</span><span style="color:#000000;">) { </span><span style="color:#800080;">$_</span><span style="color:#000000;"> }
  }
</span></pre>
<p>Here&#8217;s a quick overview of what the script is doing:</p>
<ol>
<li>I assign the limit (<code>75</code>) to a variable. This is just for my convenience of reuse. E.g. I could turn this line into <code>param($limit = 75)</code> &#8211; and save this as a parameterized script or turn it into a function.</li>
<li>I user <code><a href="http://wiki.powergui.org/index.php/Get-QADUser">Get-QADUser</a></code> to retrieve all (<code>-SizeLimit 0</code>) user accounts from my current domain and I make sure to not retrieve any attributes along &#8211; so <a href="http://dmitrysotnikov.wordpress.com/2009/09/10/fastest-way-to-retrieve-ad-objects/">I save memory and improve performance</a> (<code>-DontUseDefaultIncludedProperties</code>)</li>
<li>For each user in my domain, I retrieve the first 75 (<code>-SizeLimit $limit</code>) groups to which the user belongs directly or through nesting (<code>-ContainsIndirectMember $_.DN</code>). There&#8217;s obviously no need to retrieve all groups &#8211; we just need to know if the user reached the limit. Again, we do not need any attributes (<code>-DontUseDefaultIncludedProperties</code>). I also tell PowerShell to not warn me if there are more groups than the size limit I specified (<code>-WarningAction SilentlyContinue</code>).</li>
<li>Finally, if indeed we reached the limit, I output that user object.</li>
</ol>
<p>You can obviously then just see the list on the screen or output it to CSV or HTML report.</p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/AD" target="_blank" rel="tag" title="Link to Technorati Tag category for AD">AD</a>, <a href="http://www.technorati.com/tag/AD+cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for AD cmdlets">AD cmdlets</a>, <a href="http://www.technorati.com/tag/Active+Directory" target="_blank" rel="tag" title="Link to Technorati Tag category for Active Directory">Active Directory</a>, <a href="http://www.technorati.com/tag/Examples" target="_blank" rel="tag" title="Link to Technorati Tag category for Examples">Examples</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a>, <a href="http://www.technorati.com/tag/cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for cmdlets">cmdlets</a>, <a href="http://www.technorati.com/tag/one-liner" target="_blank" rel="tag" title="Link to Technorati Tag category for one-liner">one-liner</a>, <a href="http://www.technorati.com/tag/oneliner" target="_blank" rel="tag" title="Link to Technorati Tag category for oneliner">oneliner</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F12%2Ffind%2Dusers%2Din%2Dtoo%2Dmany%2Dgroups%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F12%2Ffind%2Dusers%2Din%2Dtoo%2Dmany%2Dgroups%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F12%2Ffind%2Dusers%2Din%2Dtoo%2Dmany%2Dgroups%2F;title=Find%20users%20in%20too%20many%20groups" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=Find%20users%20in%20too%20many%20groups&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F12%2Ffind%2Dusers%2Din%2Dtoo%2Dmany%2Dgroups%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F12%2Ffind%2Dusers%2Din%2Dtoo%2Dmany%2Dgroups%2F&amp;Title=Find%20users%20in%20too%20many%20groups" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F12%2Ffind%2Dusers%2Din%2Dtoo%2Dmany%2Dgroups%2F&amp;title=Find%20users%20in%20too%20many%20groups" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F12%2Ffind%2Dusers%2Din%2Dtoo%2Dmany%2Dgroups%2F&amp;title=Find%20users%20in%20too%20many%20groups" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=Find%20users%20in%20too%20many%20groups&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F12%2Ffind%2Dusers%2Din%2Dtoo%2Dmany%2Dgroups%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1575/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1575&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/10/12/find-users-in-too-many-groups/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>Get a list of users&#8217; email addresses</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/10/07/get-a-list-of-users-email-addresses/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/10/07/get-a-list-of-users-email-addresses/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 15:04:35 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[cmdlets]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1564</guid>
		<description><![CDATA[Here&#8217;s a one-liner to turn members of a group into a list of email addresses, separated by semicolon. I am using it every now and then when someone from our partners (which obviously do not have access to our address book) ask me for a list of folks to include in some discussions, or grant [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1564&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here&#8217;s a one-liner to turn members of a group into a list of email addresses, separated by semicolon. I am using it every now and then when someone from our partners (which obviously do not have access to our address book) ask me for a list of folks to include in some discussions, or grant access to some resources, and so on.</p>
<p>Here&#8217;s the oneliner (for PowerShell v2):</p>
<pre><span style="color:#000000;">(</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADGroupMember</span><span style="color:#000000;"> </span><span style="color:#800000;">MyGroupName</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Type</span><span style="color:#000000;"> </span><span style="color:#800000;">user</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Indirect</span><span style="color:#000000;"> |
    </span><span style="color:#5F9EA0;font-weight:bold;">Select</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-expand</span><span style="color:#000000;"> </span><span style="color:#800000;">Email</span><span style="color:#000000;">) </span><span style="color:#FF0000;">-join</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">;</span><span style="color:#800000;">'</span></pre>
<p>PowerShell v1 version has a slightly different syntax for join:</p>
<pre><span style="color:#000000;">[</span><span style="color:#008080;">string</span><span style="color:#000000;">]::</span><span style="color:#8B4513;">join</span><span style="color:#000000;">(</span><span style="color:#800000;">'</span><span style="color:#800000;">;</span><span style="color:#800000;">'</span><span style="color:#000000;">,
  (</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADGroupMember</span><span style="color:#000000;"> </span><span style="color:#800000;">MyGroupName</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Type</span><span style="color:#000000;"> </span><span style="color:#800000;">user</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Indirect</span><span style="color:#000000;"> |
    </span><span style="color:#5F9EA0;font-weight:bold;">Select</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-expand</span><span style="color:#000000;"> </span><span style="color:#800000;">Email</span><span style="color:#000000;">))
</span></pre>
<p>And here&#8217;s a quick explanation of what it does:</p>
<ul>
<li>I use <code><a href="http://wiki.powergui.org/index.php/Get-QADGroupMember">Get-QADGroupMember</a></code> to retrieve all members of the group. Note that <code>-Indirect</code> parameter gives me all members of nested groups, and <code>-Type user</code> makes sure that nested groups themselves get excluded.</li>
<li>Then I am taking the collection of user objects and turn that into a collection of just one property of the objects (Email) using  <code>Select -expand</code>.</li>
<li>Finally I am using join to turn that collection into a string and using semicolon as separator.</li>
</ul>
<p>Hope this is useful.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1564/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1564&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/10/07/get-a-list-of-users-email-addresses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>List all empty OUs</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/10/01/list-all-empty-ous/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/10/01/list-all-empty-ous/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 10:00:03 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[cmdlets]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1552</guid>
		<description><![CDATA[Here&#8217;s a one-liner you can use to quickly find empty organizational units in your Active Directory:
Get-QADObject -Type organizationalUnit -DontUseDefaultIncludedProperties &#124;
  where {
    -not ( Get-QADObject -SearchRoot $_.DN -DontUseDefaultIncludedProperties `
    -SearchScope OneLevel -SizeLimit 1 -WarningAction SilentlyContinue )
  }
A quick explanation of what I am doing here:

 I am [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1552&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here&#8217;s a one-liner you can use to quickly find empty organizational units in your Active Directory:</p>
<pre><span style="color:#5F9EA0;font-weight:bold;">Get-QADObject</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Type</span><span style="color:#000000;"> </span><span style="color:#800000;">organizationalUnit</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-DontUseDefaultIncludedProperties</span><span style="color:#000000;"> |
  </span><span style="color:#5F9EA0;font-weight:bold;">where</span><span style="color:#000000;"> {
    </span><span style="color:#FF0000;">-not</span><span style="color:#000000;"> ( </span><span style="color:#5F9EA0;font-weight:bold;">Get-QADObject</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-SearchRoot</span><span style="color:#000000;"> </span><span style="color:#800080;">$_</span><span style="color:#000000;">.DN </span><span style="color:#5F9EA0;font-style:italic;">-DontUseDefaultIncludedProperties</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">`</span><span style="color:#000000;">
    </span><span style="color:#5F9EA0;font-style:italic;">-SearchScope</span><span style="color:#000000;"> </span><span style="color:#800000;">OneLevel</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-SizeLimit</span><span style="color:#000000;"> </span><span style="color:#000000;">1</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-WarningAction</span><span style="color:#000000;"> </span><span style="color:#800000;">SilentlyContinue</span><span style="color:#000000;"> )
  }</span></pre>
<p>A quick explanation of what I am doing here:</p>
<ol>
<li> I am retrieving all <code>organizationalUnit </code>objects from my domain (and use the <a href="http://dmitrysotnikov.wordpress.com/2009/09/10/fastest-way-to-retrieve-ad-objects/"><code>-DontUseDefaultIncludedProperties</code> switch to save a few milliseconds</a> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</li>
<li> Then for each of the OUs I am retrieving all AD objects that are in that OU by doing a <code>Get-QADObject</code> and limiting the search scope to the DN of the current OU.</li>
<li> Note that (<a href="http://dmitrysotnikov.wordpress.com/2009/09/08/find-large-ad-groups/">like we did when looking for large groups</a>) I am using the <code>-SizeLimit</code> parameter to see if I can get 1 item in the call (all I need is to learn whether there is <em>anything</em> in the OU &#8211; I don&#8217;t need the whole list) &#8211; which obviously makes the whole script magnitudes of time faster. I use -SearchScope </li>
<li> Based on Kirk&#8217;s recommendation I am using <code>-SearchScope OneLevel</code> to exclude the OU itself.</li>
<li> I am using -not operator so I get only the OUs for which this Get-QADObject evaluates to <code>$null</code> (nothing found) and thus <code>-not $null</code> evaluates to <code>$true</code>.</li>
</ol>
<p>P.S. This is the code I was using initially, which I then corrected based on Kirk&#8217;s comments below:</p>
<p><code>$emptyOUs = Get-QADObject -Type organizationalUnit -DontUseDefaultIncludedProperties | where {(Get-QADObject -SearchRoot $_.DN -SizeLimit 2 -DontUseDefaultIncludedProperties).Count -lt 2}</code></p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/AD" target="_blank" rel="tag" title="Link to Technorati Tag category for AD">AD</a>, <a href="http://www.technorati.com/tag/AD+cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for AD cmdlets">AD cmdlets</a>, <a href="http://www.technorati.com/tag/Active+Directory" target="_blank" rel="tag" title="Link to Technorati Tag category for Active Directory">Active Directory</a>, <a href="http://www.technorati.com/tag/Examples" target="_blank" rel="tag" title="Link to Technorati Tag category for Examples">Examples</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a>, <a href="http://www.technorati.com/tag/cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for cmdlets">cmdlets</a>, <a href="http://www.technorati.com/tag/one-liner" target="_blank" rel="tag" title="Link to Technorati Tag category for one-liner">one-liner</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F01%2Flist%2Dall%2Dempty%2Dous%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F01%2Flist%2Dall%2Dempty%2Dous%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F01%2Flist%2Dall%2Dempty%2Dous%2F;title=List%20all%20empty%20OUs" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=List%20all%20empty%20OUs&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F01%2Flist%2Dall%2Dempty%2Dous%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F01%2Flist%2Dall%2Dempty%2Dous%2F&amp;Title=List%20all%20empty%20OUs" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F01%2Flist%2Dall%2Dempty%2Dous%2F&amp;title=List%20all%20empty%20OUs" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F01%2Flist%2Dall%2Dempty%2Dous%2F&amp;title=List%20all%20empty%20OUs" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=List%20all%20empty%20OUs&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F10%2F01%2Flist%2Dall%2Dempty%2Dous%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1552/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1552&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/10/01/list-all-empty-ous/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>What was that group again?</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/08/26/what-was-that-group-again/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/08/26/what-was-that-group-again/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 10:55:52 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1490</guid>
		<description><![CDATA[A simple one-liner can help. Just earlier today I could not remember the name of a particular distribution list but knew a couple of its members. The quick one-liner to help me out was:
Get-QADGroup -ContainsMember ('User A', 'User B')
And while we are on it, here&#8217;s an even better one-liner if you want to find a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1490&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A simple one-liner can help. Just earlier today I could not remember the name of a particular distribution list but knew a couple of its members. The quick one-liner to help me out was:</p>
<pre><span style="color:#5F9EA0;font-weight:bold;">Get-QADGroup</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-ContainsMember</span><span style="color:#000000;"> (</span><span style="color:#800000;">'</span><span style="color:#800000;">User A</span><span style="color:#800000;">'</span><span style="color:#000000;">, </span><span style="color:#800000;">'</span><span style="color:#800000;">User B</span><span style="color:#800000;">'</span><span style="color:#000000;">)</span></pre>
<p>And while we are on it, here&#8217;s an even better one-liner if you want to find a DL which has all direct reports of, say, your company&#8217;s VP:</p>
<pre><span style="color:#5F9EA0;font-weight:bold;">Get-QADGroup</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-ContainsMember</span><span style="color:#000000;"> (</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Manager</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">User C</span><span style="color:#800000;">'</span><span style="color:#000000;">)</span></pre>
<p>And obviously if such a DL does not exist, you should probably just go ahead and create it <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre><span style="color:#5F9EA0;font-weight:bold;">New-QADGroup</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">Top Managers</span><span style="color:#800000;">'</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Member</span><span style="color:#000000;"> (</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Manager</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">User C</span><span style="color:#800000;">'</span><span style="color:#000000;">)</span></pre>
<p>I love PowerShell. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/AD" target="_blank" rel="tag" title="Link to Technorati Tag category for AD">AD</a>, <a href="http://www.technorati.com/tag/AD+cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for AD cmdlets">AD cmdlets</a>, <a href="http://www.technorati.com/tag/Active+Directory" target="_blank" rel="tag" title="Link to Technorati Tag category for Active Directory">Active Directory</a>, <a href="http://www.technorati.com/tag/Examples" target="_blank" rel="tag" title="Link to Technorati Tag category for Examples">Examples</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a>, <a href="http://www.technorati.com/tag/one-liner" target="_blank" rel="tag" title="Link to Technorati Tag category for one-liner">one-liner</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F08%2F26%2Fwhat%2Dwas%2Dthat%2Dgroup%2Dagain%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F08%2F26%2Fwhat%2Dwas%2Dthat%2Dgroup%2Dagain%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F08%2F26%2Fwhat%2Dwas%2Dthat%2Dgroup%2Dagain%2F;title=What%20was%20that%20group%20again%3F" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=What%20was%20that%20group%20again%3F&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F08%2F26%2Fwhat%2Dwas%2Dthat%2Dgroup%2Dagain%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F08%2F26%2Fwhat%2Dwas%2Dthat%2Dgroup%2Dagain%2F&amp;Title=What%20was%20that%20group%20again%3F" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F08%2F26%2Fwhat%2Dwas%2Dthat%2Dgroup%2Dagain%2F&amp;title=What%20was%20that%20group%20again%3F" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F08%2F26%2Fwhat%2Dwas%2Dthat%2Dgroup%2Dagain%2F&amp;title=What%20was%20that%20group%20again%3F" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=What%20was%20that%20group%20again%3F&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F08%2F26%2Fwhat%2Dwas%2Dthat%2Dgroup%2Dagain%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1490/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1490&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/08/26/what-was-that-group-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>Detect AD schema version from PowerShell</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/08/12/detect-ad-schema-version-from-powershell/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/08/12/detect-ad-schema-version-from-powershell/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 11:53:00 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1463</guid>
		<description><![CDATA[Just wanted to share a quick one-liner to check Active Directory domain and forest functional level with AD cmdlets:
[PS] C:\ &#62;Get-QADRootDSE &#124; Format-List *

DomainControllerFunctionality : Windows2003
DomainFunctionality           : Windows2003
ForestFunctionality           : Windows2003
IsGlobalCatalogReady      [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1463&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just wanted to share a quick one-liner to check Active Directory domain and forest functional level with AD cmdlets:</p>
<p><code>[PS] C:\ &gt;<a href="http://wiki.powergui.org/index.php/Get-QADRootDSE">Get-QADRootDSE</a> | Format-List *</code><br />
<code></code><br />
<code>DomainControllerFunctionality : Windows2003</code><br />
<code>DomainFunctionality           : Windows2003</code><br />
<code>ForestFunctionality           : Windows2003</code><br />
<code>IsGlobalCatalogReady          : True</code><br />
<code><em>... and so on ...</em></code></p>
<p>Quick, easy and comes quite handy. Besides the AD schema info <a href="http://wiki.powergui.org/index.php/Get-QADRootDSE">there&#8217;s other useful information</a> &#8211; so definitely worth adding to your arsenal.</p>
<p>[UPDATE] <a href="http://blogs.microsoft.co.il/blogs/scriptfanatic/">Shay</a> and <a href="http://thepowershellguy.com/">MoW</a> both contacted me saying that I did not include the one-liner which would give you the exact version number. Here you go:</p>
<p><span style="color:#000000;">(</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADObject</span><span style="color:#000000;"> (</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADRootDSE</span><span style="color:#000000;">).SchemaNamingContext </span><span style="color:#5F9EA0;font-style:italic;">-IncludedProperties</span><span style="color:#000000;"> </span><span style="color:#800000;">objectVersion</span><span style="color:#000000;">).objectVersion</span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1463/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1463&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/08/12/detect-ad-schema-version-from-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>AD Recovery from PowerShell</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/06/22/ad-recovery-from-powershell/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/06/22/ad-recovery-from-powershell/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 10:00:56 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Quest Software]]></category>
		<category><![CDATA[cmdlets]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1321</guid>
		<description><![CDATA[Want to roll back any Active Directory change with a PowerShell one-liner? We&#8217;ve just published an online reference to the cmdlets shipped with Quest Recovery manager for Active Directory.
These cmdlets use backups so they are not limited to tombstone reanimation (as regular cmdlets).
For example, if you restore a user you get all the attributes including [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1321&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Want to roll back any Active Directory change with a PowerShell one-liner? We&#8217;ve <a href="http://wiki.powergui.org/index.php/Quest_Recovery_Manager_for_Active_Directory_cmdlets_reference">just published</a> an online reference to the cmdlets shipped with Quest Recovery manager for Active Directory.</p>
<p>These cmdlets use backups so they are not limited to tombstone reanimation (<a href="http://dmitrysotnikov.wordpress.com/2009/05/07/ad-cmdlets-for-object-undelete">as regular cmdlets</a>).</p>
<p>For example, if you restore a user you get all the attributes including group membership and so on.</p>
<p>So to restore a deleted object you simply call <a href="http://wiki.powergui.org/index.php/Restore-RMDeletedActiveDirectoryObject"><code>Restore-RMDeletedActiveDirectoryObject</code></a> and have the tool handle everything.</p>
<p>However, what makes it way more cool is that you have full power to restore any attributes of any users. So you are not limited to just undeleting stuff. Let&#8217;s say you had some kind of script/tool go wild and corrupt an attribute or two across all user accounts. Good luck restoring just these 2 attributes manually or with any kind of UI tool.</p>
<p>With these cmdlets it is as easy as:</p>
<p><code># Select the backup you want - e.g. the latest</code><br />
<code>$b = (Get-RMBackup –Domain dom1.local | Sort-Object –Property Date)[-1]</code><br />
<code><br />
# For every user in AD restore extensionattribute1</code><br />
<code>Get-QADUser | foreach { </code><br />
<code>Restore-RMActiveDirectoryObject –Backup $b.Path –Object $_.DN –Attribute extensionattribute1</code><br />
<code>}</code></p>
<p>Is it cool or what? <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Here&#8217;s the full list of cmdlets linked to the help info for each of them:</p>
<ul>
<li> <a title="Compare-RMActiveDirectoryObject" href="http://wiki.powergui.org/index.php/Compare-RMActiveDirectoryObject">Compare-RMActiveDirectoryObject</a></li>
<li> <a title="Restore-RMActiveDirectoryObject" href="http://wiki.powergui.org/index.php/Restore-RMActiveDirectoryObject">Restore-RMActiveDirectoryObject</a></li>
<li> <a title="Get-RMDeletedActiveDirectoryObject" href="http://wiki.powergui.org/index.php/Get-RMDeletedActiveDirectoryObject">Get-RMDeletedActiveDirectoryObject</a></li>
<li> <a title="Restore-RMDeletedActiveDirectoryObject" href="http://wiki.powergui.org/index.php/Restore-RMDeletedActiveDirectoryObject">Restore-RMDeletedActiveDirectoryObject</a></li>
</ul>
<ul>
<li> <a title="Get-RMBackup" href="http://wiki.powergui.org/index.php/Get-RMBackup">Get-RMBackup</a></li>
<li> <a title="Start-RMBackup" href="http://wiki.powergui.org/index.php/Start-RMBackup">Start-RMBackup</a></li>
<li> <a title="Add-RMBackup" href="http://wiki.powergui.org/index.php/Add-RMBackup">Add-RMBackup</a></li>
<li> <a title="Import-RMBackup" href="http://wiki.powergui.org/index.php/Import-RMBackup">Import-RMBackup</a></li>
<li> <a title="Export-RMBackup" href="http://wiki.powergui.org/index.php/Export-RMBackup">Export-RMBackup</a></li>
</ul>
<ul>
<li> <a title="Get-RMBackupContent" href="http://wiki.powergui.org/index.php/Get-RMBackupContent">Get-RMBackupContent</a></li>
</ul>
<ul>
<li> <a title="Get-RMCollection" href="http://wiki.powergui.org/index.php/Get-RMCollection">Get-RMCollection</a></li>
<li> <a title="New-RMCollection" href="http://wiki.powergui.org/index.php/New-RMCollection">New-RMCollection</a></li>
<li> <a title="Set-RMCollection" href="http://wiki.powergui.org/index.php/Set-RMCollection">Set-RMCollection</a></li>
<li> <a title="Rename-RMCollection" href="http://wiki.powergui.org/index.php/Rename-RMCollection">Rename-RMCollection</a></li>
<li> <a title="Remove-RMCollection" href="http://wiki.powergui.org/index.php/Remove-RMCollection">Remove-RMCollection</a></li>
</ul>
<ul>
<li> <a title="Add-RMCollectionItem" href="http://wiki.powergui.org/index.php/Add-RMCollectionItem">Add-RMCollectionItem</a></li>
</ul>
<ul>
<li> <a title="Start-RMReportViewer" href="http://wiki.powergui.org/index.php/Start-RMReportViewer">Start-RMReportViewer</a></li>
</ul>
<ul>
<li> <a title="New-RMSchedule" href="http://wiki.powergui.org/index.php/New-RMSchedule">New-RMSchedule</a></li>
<li> <a title="Get-RMSession" href="http://wiki.powergui.org/index.php/Get-RMSession">Get-RMSession</a></li>
</ul>
<p>Note that unlike AD cmdlets these are actually a part of commercial product so there is cost involved. You can get a trial license <a href="http://www.quest.com/recovery-manager-for-active-directory/">from the product page</a>. If you are a Microsoft MVP you can also get a free NFR license by applying <a href="http://www.quest.com/common/registration.aspx?requestdefid=12767">here</a>.</p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:87px;width:1px;height:1px;">
<pre>(Get-RMDeletedActiveDirectoryObject dc1.dom1.lab.local) | Where-Object { $_.Properties["objectclass"] –contains "user" }

C:\PS&gt;foreach ($u in $users) { Restore-RMDeletedActiveDirectoryObject –Name $u.Properties["name"] –DirectoryHost dc1.dom1.lab.local }</pre>
</div>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/AD" target="_blank" rel="tag" title="Link to Technorati Tag category for AD">AD</a>, <a href="http://www.technorati.com/tag/Active+Directory" target="_blank" rel="tag" title="Link to Technorati Tag category for Active Directory">Active Directory</a>, <a href="http://www.technorati.com/tag/Examples" target="_blank" rel="tag" title="Link to Technorati Tag category for Examples">Examples</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a>, <a href="http://www.technorati.com/tag/Quest+Software" target="_blank" rel="tag" title="Link to Technorati Tag category for Quest Software">Quest Software</a>, <a href="http://www.technorati.com/tag/cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for cmdlets">cmdlets</a>, <a href="http://www.technorati.com/tag/one-liner" target="_blank" rel="tag" title="Link to Technorati Tag category for one-liner">one-liner</a>, <a href="http://www.technorati.com/tag/MVP" target="_blank" rel="tag" title="Link to Technorati Tag category for MVP">MVP</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F22%2Fad%2Drecovery%2Dfrom%2Dpowershell%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F22%2Fad%2Drecovery%2Dfrom%2Dpowershell%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F22%2Fad%2Drecovery%2Dfrom%2Dpowershell%2F;title=AD%20Recovery%20from%20PowerShell" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=AD%20Recovery%20from%20PowerShell&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F22%2Fad%2Drecovery%2Dfrom%2Dpowershell%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F22%2Fad%2Drecovery%2Dfrom%2Dpowershell%2F&amp;Title=AD%20Recovery%20from%20PowerShell" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F22%2Fad%2Drecovery%2Dfrom%2Dpowershell%2F&amp;title=AD%20Recovery%20from%20PowerShell" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F22%2Fad%2Drecovery%2Dfrom%2Dpowershell%2F&amp;title=AD%20Recovery%20from%20PowerShell" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=AD%20Recovery%20from%20PowerShell&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F22%2Fad%2Drecovery%2Dfrom%2Dpowershell%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1321/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1321&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/06/22/ad-recovery-from-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>Find large objects in AD</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/06/08/find-large-objects-in-ad/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/06/08/find-large-objects-in-ad/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 10:00:34 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[cmdlets]]></category>
		<category><![CDATA[one-liner]]></category>
		<category><![CDATA[oneliner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1256</guid>
		<description><![CDATA[How do you find the user accounts which take up the most space in Active Directory database?
I have just had this very question from a customer who has some BLOB attributes added to user objects and suspect that some of these got much bigger than the others. As result, the overall AD database is now [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1256&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>How do you find the user accounts which take up the most space in Active Directory database?</p>
<p>I have just had this very question from a customer who has some BLOB attributes added to user objects and suspect that some of these got much bigger than the others. As result, the overall AD database is now way bigger than the customer would like to have (affecting performance, backups, replication, and so on.)</p>
<p>The problem they had is finding these objects.</p>
<p>My first reaction was: just do a <code><a href="http://wiki.powergui.org/index.php/Get-QADUser">Get-QADUser</a></code> and sort the objects by size &#8211; how much easier can it get? Well, the problem is that there is just <a href="http://www.eggheadcafe.com/community/aspnet/2/9568/here-is-what-chris-brumme.aspx">no SizeOf function in PowerShell</a> &#8211; the system would not tell you how big a given object is.</p>
<p>The workaround I found was very simple. If we cannot get the in-memory size of an object &#8211; we can still export it to a file and measure the file size. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So here is my script:</p>
<pre><span style="color:#008000;">#</span><span style="color:#008000;"> Use a different value of SizeLimit </span><span style="color:#008000;">
#</span><span style="color:#008000;"> if you want a subset of accounts to test the script</span><span style="color:#008000;">
</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-SizeLimit</span><span style="color:#000000;"> </span><span style="color:#000000;">0</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-IncludeAllProperties</span><span style="color:#000000;"> | </span><span style="color:#5F9EA0;font-weight:bold;">ForEach</span><span style="color:#000000;"> {
    </span><span style="color:#000080;">$_</span><span style="color:#000000;"> |  </span><span style="color:#5F9EA0;font-weight:bold;">Export-Clixml</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">$($_.samAccountName).xml</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
</span><span style="color:#5F9EA0;font-weight:bold;">dir</span><span style="color:#000000;"> | </span><span style="color:#5F9EA0;font-weight:bold;">sort</span><span style="color:#000000;"> </span><span style="color:#800000;">Length</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Descending</span></pre>
<p>In a nutshell, all it does is goes through all AD user accounts, and exports each into xml file.</p>
<p>Then I just sort them by size.</p>
<p>The cool part about using ForEach-Object and not keeping all objects in an array is that this is actually very efficient from memory consumption perspective &#8211; <a href="http://dmitrysotnikov.wordpress.com/2007/07/24/optimize-powershell-performance-and-memory-consumption/">each object gets cleared from memory after it is saved to xml</a>.</p>
<p>Throughout running the script powershell.exe process was consuming only about 30-40MB of RAM.</p>
<p>One thing to note is that in most domains this script will take a long time to execute (hours). You can make it faster if you can limit the scope of Get-QADUser either by some attributes (SearchRoot, Enabled/Disabled, City, and so on) or properties (I was retrieving all, but if you actually know which properties contribute the most to the size you can include just these properties.) Again, see <a href="http://dmitrysotnikov.wordpress.com/2007/07/24/optimize-powershell-performance-and-memory-consumption/">this post for more consideration on optimizing the script</a>.</p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/AD" target="_blank" rel="tag" title="Link to Technorati Tag category for AD">AD</a>, <a href="http://www.technorati.com/tag/AD+cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for AD cmdlets">AD cmdlets</a>, <a href="http://www.technorati.com/tag/Active+Directory" target="_blank" rel="tag" title="Link to Technorati Tag category for Active Directory">Active Directory</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a>, <a href="http://www.technorati.com/tag/cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for cmdlets">cmdlets</a>, <a href="http://www.technorati.com/tag/one-liner" target="_blank" rel="tag" title="Link to Technorati Tag category for one-liner">one-liner</a>, <a href="http://www.technorati.com/tag/oneliner" target="_blank" rel="tag" title="Link to Technorati Tag category for oneliner">oneliner</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F08%2Ffind%2Dlarge%2Dobjects%2Din%2Dad%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F08%2Ffind%2Dlarge%2Dobjects%2Din%2Dad%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F08%2Ffind%2Dlarge%2Dobjects%2Din%2Dad%2F;title=Find%20large%20objects%20in%20AD" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=Find%20large%20objects%20in%20AD&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F08%2Ffind%2Dlarge%2Dobjects%2Din%2Dad%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F08%2Ffind%2Dlarge%2Dobjects%2Din%2Dad%2F&amp;Title=Find%20large%20objects%20in%20AD" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F08%2Ffind%2Dlarge%2Dobjects%2Din%2Dad%2F&amp;title=Find%20large%20objects%20in%20AD" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F08%2Ffind%2Dlarge%2Dobjects%2Din%2Dad%2F&amp;title=Find%20large%20objects%20in%20AD" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=Find%20large%20objects%20in%20AD&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F08%2Ffind%2Dlarge%2Dobjects%2Din%2Dad%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1256/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1256&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/06/08/find-large-objects-in-ad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>AD cmdlets for object undelete</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/05/07/ad-cmdlets-for-object-undelete/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/05/07/ad-cmdlets-for-object-undelete/#comments</comments>
		<pubDate>Thu, 07 May 2009 22:01:24 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[cmdlets]]></category>
		<category><![CDATA[one-liner]]></category>
		<category><![CDATA[oneliner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1181</guid>
		<description><![CDATA[Another great new feature in Quest&#8217;s free AD cmdlets 1.2 is ability to locate deleted (tombstoned) Active Directory objects and restore them back.
Locating is very straight-forward: you just add the -Tombstone switch to the Get-* cmdlet of your choice and now your query searches deleted rather than live objects.
Restoring is even easier &#8211; all you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1181&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Another great new feature in Quest&#8217;s free <a href="http://dmitrysotnikov.wordpress.com/2009/04/10/ad-cmdlets-reference-updated/">AD cmdlets 1.2</a> is ability to locate deleted (<a href="http://technet.microsoft.com/en-us/magazine/cc137800.aspx">tombstoned</a>) Active Directory objects and restore them back.</p>
<p>Locating is very straight-forward: you just add the -Tombstone switch to the Get-* cmdlet of your choice and now your query searches deleted rather than live objects.</p>
<p>Restoring is even easier &#8211; all you need is pipeline the deleted objects into <a title="Restore-QADDeletedObject" href="http://wiki.powergui.org/index.php/Restore-QADDeletedObject"><code>Restore-QADDeletedObject</code></a>.</p>
<p>And the best thing of all is that this works great with Windows 2003 Active Directory &#8211; so you can start taking advantage of the feature right away!</p>
<p>For example:</p>
<p><code># List all tombstoned user accounts</code><br />
<code>Get-QADUser -Tombstone</code></p>
<p><code># Restore accounts deleted from a specific OU</code><br />
<code>Get-QADUser -Tombstone  -LastKnownParent 'OU=People,DC=company,dc=local' | Restore-QADDeletedObject</code></p>
<p><code># Restore accounts deleted today</code><br />
<code>Get-QADUser -Tombstone  –LastChangedOn (get-date) | Restore-QADDeletedObject</code></p>
<p><code># Restore a specific deleted user</code><br />
<code>Get-QADUser -Tombstone –Name 'John Smith*' | Restore-QADDeletedObject</code></p>
<p>One gotcha to keep in mind is that when objects are tombstoned computer and user objects are stored in AD exactly the same way. This makes <a href="http://wiki.powergui.org/index.php/Get-QADUser">Get-QADUser</a> actually return both user and computer objects. <a href="http://blogs.microsoft.co.il/blogs/ScriptFanatic/">Shay</a> found this workaround to make sure that only user objects are returned:</p>
<p><code># Return all tombstoned user accounts but no computer objects</code><br />
<code>Get-QADUser -Tombstone -SizeLimit 0 -ldap '(&amp;(!samAccountName=*$))'</code></p>
<p>Other Get-* cmdlets which now have these -Tombstone and -LastKnownParent parameters are:<a title="Get-QADComputer" href="http://wiki.powergui.org/index.php/Get-QADComputer"></a></p>
<ul>
<li><a title="Get-QADComputer" href="http://wiki.powergui.org/index.php/Get-QADComputer">Get-QADComputer</a></li>
<li><a title="Get-QADGroup" href="http://wiki.powergui.org/index.php/Get-QADGroup">Get-QADGroup</a></li>
<li><a title="Get-QADObject" href="http://wiki.powergui.org/index.php/Get-QADObject">Get-QADObject</a></li>
<li><a title="Get-QADPasswordSettingsObject" href="http://wiki.powergui.org/index.php/Get-QADPasswordSettingsObject">Get-QADPasswordSettingsObject</a></li>
</ul>
<p><a title="Get-QADUser" href="http://wiki.powergui.org/index.php/Get-QADUser"></a>For more information on what a tombstoned object is and how tombstone-based undelete is different from full recovery see <a href="http://technet.microsoft.com/en-us/magazine/cc137800.aspx">Gil’s article here</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1181&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/05/07/ad-cmdlets-for-object-undelete/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell script to select email recipients</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/04/24/powershell-script-to-select-email-recipients/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/04/24/powershell-script-to-select-email-recipients/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 09:00:22 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[PowerGUI]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[cmdlets]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1157</guid>
		<description><![CDATA[Here&#8217;s a real-life problem I had earlier this week. I had to set up a meeting which would have all key people from our St. Petersburg office. Now&#8230; How would Outlook know who &#8220;key people&#8221; are? PowerShell helped me figure that out with a quick one-liner!
We have a couple of local DLs which I could [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1157&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here&#8217;s a real-life problem I had earlier this week. I had to set up a meeting which would have all key people from our St. Petersburg office. Now&#8230; How would Outlook know who &#8220;key people&#8221; are? PowerShell helped me figure that out with a quick one-liner!</p>
<p>We have a couple of local DLs which I could use (let&#8217;s call them &#8220;SPb Project Managers&#8221; and &#8220;SPb Program Managers&#8221;) but I was worried that these might not have dev architects who I also wanted to have. Turns out, we at Quest have another DL (let&#8217;s call it &#8220;Architects&#8221; &#8211; which has the folks I need but&#8230; spawns all Quest offices worldwide).</p>
<p>So looks like I had to invite &#8220;SPb Project Managers&#8221; and &#8220;SPb Program Managers&#8221; DLs, and everyone who is in the &#8220;Architects&#8221; one but only from St. Petersburg and outside the two other DLs. Turns out that <a href="http://dmitrysotnikov.wordpress.com/2009/04/15/new-group-membership-cmdlets/">new group membership AD cmdlets</a> make this a piece of cake:</p>
<pre><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-City</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">Saint Petersburg</span><span style="color:#800000;">'</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">`</span><span style="color:#000000;">
    </span><span style="color:#5F9EA0;font-style:italic;">-MemberOf</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">Architects</span><span style="color:#800000;">'</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">`</span><span style="color:#000000;">
    </span><span style="color:#5F9EA0;font-style:italic;">-NotIndirectMemberOf</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">SPb Project Managers</span><span style="color:#800000;">'</span><span style="color:#000000;">, </span><span style="color:#800000;">'</span><span style="color:#800000;">SPb Program Managers</span><span style="color:#800000;">'</span></pre>
<p>Now I just need to turn this user list into a single string of names separated by semicolons (so I can copy/paste it into Outlook). This means I need to take only Name properties from the values and then join them with a separator.</p>
<p>In PowerShell v1 this can be done with <code>[string]::join()</code>, in v2 using the new <code>-join</code> operator.</p>
<p>So here&#8217;s the final PowerShell v1 code:</p>
<pre><span style="color:#000000;">[</span><span style="color:#008080;">string</span><span style="color:#000000;">]::</span><span style="color:#8B4513;">join</span><span style="color:#000000;">( </span><span style="color:#800000;">"</span><span style="color:#800000;">; </span><span style="color:#800000;">"</span><span style="color:#000000;">, (</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-City</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">Saint Petersburg</span><span style="color:#800000;">'</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">`</span><span style="color:#000000;">
    </span><span style="color:#5F9EA0;font-style:italic;">-MemberOf</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">Architects</span><span style="color:#800000;">'</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">`</span><span style="color:#000000;">
    </span><span style="color:#5F9EA0;font-style:italic;">-NotIndirectMemberOf</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">SPb Project Managers</span><span style="color:#800000;">'</span><span style="color:#000000;">, </span><span style="color:#800000;">'</span><span style="color:#800000;">SPb Program Managers</span><span style="color:#800000;">'</span><span style="color:#000000;"> |
    </span><span style="color:#5F9EA0;font-weight:bold;">ForEach-Object</span><span style="color:#000000;"> { </span><span style="color:#000080;">$_</span><span style="color:#000000;">.Name }))</span></pre>
<p>And here&#8217;s the one for v2:</p>
<pre><span style="color:#000000;">(</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-City</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">Saint Petersburg</span><span style="color:#800000;">'</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">`</span><span style="color:#000000;">
    -MemberOf </span><span style="color:#800000;">'</span><span style="color:#800000;">Architects</span><span style="color:#800000;">'</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">`</span><span style="color:#000000;">
    -NotIndirectMemberOf </span><span style="color:#800000;">'</span><span style="color:#800000;">SPb Project Managers</span><span style="color:#800000;">'</span><span style="color:#000000;">, </span><span style="color:#800000;">'</span><span style="color:#800000;">SPb Program Managers</span><span style="color:#800000;">'</span><span style="color:#000000;"> |
    </span><span style="color:#5F9EA0;font-weight:bold;">ForEach-Object</span><span style="color:#000000;"> { </span><span style="color:#000080;">$_</span><span style="color:#000000;">.Name }) </span><span style="color:#FF0000;">-join</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">; </span><span style="color:#800000;">"</span></pre>
<p>Now, if only I could type PowerShell right inside the Outlook <em>To </em>field&#8230; One day it will hopefully get that pervasive. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/AD" target="_blank" rel="tag" title="Link to Technorati Tag category for AD">AD</a>, <a href="http://www.technorati.com/tag/AD+cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for AD cmdlets">AD cmdlets</a>, <a href="http://www.technorati.com/tag/Active+Directory" target="_blank" rel="tag" title="Link to Technorati Tag category for Active Directory">Active Directory</a>, <a href="http://www.technorati.com/tag/Examples" target="_blank" rel="tag" title="Link to Technorati Tag category for Examples">Examples</a>, <a href="http://www.technorati.com/tag/PowerGUI" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerGUI">PowerGUI</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a>, <a href="http://www.technorati.com/tag/cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for cmdlets">cmdlets</a>, <a href="http://www.technorati.com/tag/one-liner" target="_blank" rel="tag" title="Link to Technorati Tag category for one-liner">one-liner</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F24%2Fpowershell%2Dscript%2Dto%2Dselect%2Demail%2Drecipients%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F24%2Fpowershell%2Dscript%2Dto%2Dselect%2Demail%2Drecipients%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F24%2Fpowershell%2Dscript%2Dto%2Dselect%2Demail%2Drecipients%2F;title=PowerShell%20script%20to%20select%20email%20recipients" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=PowerShell%20script%20to%20select%20email%20recipients&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F24%2Fpowershell%2Dscript%2Dto%2Dselect%2Demail%2Drecipients%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F24%2Fpowershell%2Dscript%2Dto%2Dselect%2Demail%2Drecipients%2F&amp;Title=PowerShell%20script%20to%20select%20email%20recipients" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F24%2Fpowershell%2Dscript%2Dto%2Dselect%2Demail%2Drecipients%2F&amp;title=PowerShell%20script%20to%20select%20email%20recipients" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F24%2Fpowershell%2Dscript%2Dto%2Dselect%2Demail%2Drecipients%2F&amp;title=PowerShell%20script%20to%20select%20email%20recipients" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=PowerShell%20script%20to%20select%20email%20recipients&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F24%2Fpowershell%2Dscript%2Dto%2Dselect%2Demail%2Drecipients%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1157&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/04/24/powershell-script-to-select-email-recipients/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>So who did we hire last month?</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/04/17/so-who-did-we-hire-last-month/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/04/17/so-who-did-we-hire-last-month/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 16:08:05 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[cmdlets]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1149</guid>
		<description><![CDATA[CreatedOn, CreatedAfter, and CreatedBefore parameters added in 1.2 to all Get-QAD* cmdlets are another new feature I would like to spotlight in my blog.
These can accept DateTime values or just strings which PowerShell can convert to such (automated type conversion in PowerShell is pretty cool.)
# Let's see all the new user accounts created since the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1149&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><code>CreatedOn</code>, <code>CreatedAfter</code>, and <code>CreatedBefore </code>parameters <a href="http://dmitrysotnikov.wordpress.com/2009/04/10/ad-cmdlets-reference-updated/">added in 1.2</a> to all Get-QAD* cmdlets are another new feature I would like to spotlight in my blog.</p>
<p>These can accept DateTime values or just strings which PowerShell can convert to such (automated type conversion in PowerShell is pretty cool.)</p>
<pre><span style="color:#008000;">#</span><span style="color:#008000;"> Let's see all the new user accounts created since the 1st of the month</span><span style="color:#008000;">
</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-CreatedAfter</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">April 1, 2009</span><span style="color:#800000;">"</span><span style="color:#000000;">

</span><span style="color:#008000;">#</span><span style="color:#008000;"> Can narrow it down to specific OU to exclude service accounts</span><span style="color:#008000;">
</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-CreatedAfter</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">April 1, 2009</span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-SearchRoot</span><span style="color:#000000;"> </span><span style="color:#800000;">mydomain.local</span><span style="color:#000000;">/</span><span style="color:#800000;">employees</span><span style="color:#000000;">

</span><span style="color:#008000;">#</span><span style="color:#008000;"> Same thing for groups, computers, OUs, or any AD objects</span><span style="color:#008000;">
</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADComputer</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-CreatedAfter</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">April 1, 2009</span><span style="color:#800000;">"</span><span style="color:#000000;">
</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADGroup</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-CreatedAfter</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">April 1, 2009</span><span style="color:#800000;">"</span><span style="color:#000000;">

</span><span style="color:#008000;">#</span><span style="color:#008000;"> Did we hire anyone today?</span><span style="color:#008000;">
</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-CreatedOn</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">April 17, 2009</span><span style="color:#800000;">"</span><span style="color:#000000;">

</span><span style="color:#008000;">#</span><span style="color:#008000;"> Let's if we have anyone who is with the company for more than 10 years <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </span><span style="color:#008000;">
</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-CreatedBefore</span><span style="color:#000000;"> (</span><span style="color:#5F9EA0;font-weight:bold;">Get-Date</span><span style="color:#000000;">).AddYears(</span><span style="color:#FF0000;">-</span><span style="color:#000000;">10</span><span style="color:#000000;">) </span><span style="color:#5F9EA0;font-style:italic;">-SearchRoot</span><span style="color:#000000;"> </span><span style="color:#800000;">d.local</span><span style="color:#000000;">/</span><span style="color:#800000;">emp</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Enabled</span><span style="color:#000000;"> 

</span><span style="color:#008000;">#</span><span style="color:#008000;"> Let's count how many employees we were hiring monthly</span><span style="color:#008000;">
</span><span style="color:#0000FF;">for</span><span style="color:#000000;"> (</span><span style="color:#800080;">$d</span><span style="color:#000000;"> </span><span style="color:#FF0000;">=</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-weight:bold;">Get-Date</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">January 1, 2008</span><span style="color:#800000;">"</span><span style="color:#000000;">; </span><span style="color:#800080;">$d</span><span style="color:#000000;"> </span><span style="color:#FF0000;">-le</span><span style="color:#000000;"> (</span><span style="color:#5F9EA0;font-weight:bold;">Get-Date</span><span style="color:#000000;">); </span><span style="color:#800080;">$d</span><span style="color:#000000;"> </span><span style="color:#FF0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$d</span><span style="color:#000000;">.</span><span style="color:#8B4513;">AddMonths</span><span style="color:#000000;">(</span><span style="color:#000000;">1</span><span style="color:#000000;">)) {
  </span><span style="color:#800000;">"</span><span style="color:#800000;">$($d.ToShortDateString()) to $($d.AddMonths(1).ToShortDateString()):</span><span style="color:#800000;">"</span><span style="color:#000000;">
  (</span><span style="color:#5F9EA0;font-weight:bold;">Get-QADUser</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-CreatedAfter</span><span style="color:#000000;"> </span><span style="color:#800080;">$d</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-CreatedBefore</span><span style="color:#000000;"> </span><span style="color:#800080;">$d</span><span style="color:#000000;">.</span><span style="color:#8B4513;">AddMonths</span><span style="color:#000000;">(</span><span style="color:#000000;">1</span><span style="color:#000000;">)).Count
}</span></pre>
<p>And you can use other parameters to get the data by department, city, title, and so on!</p>
<p>Now go to your HR and ask them if they can provide data like that so quickly. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/AD" target="_blank" rel="tag" title="Link to Technorati Tag category for AD">AD</a>, <a href="http://www.technorati.com/tag/AD+cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for AD cmdlets">AD cmdlets</a>, <a href="http://www.technorati.com/tag/Active+Directory" target="_blank" rel="tag" title="Link to Technorati Tag category for Active Directory">Active Directory</a>, <a href="http://www.technorati.com/tag/Examples" target="_blank" rel="tag" title="Link to Technorati Tag category for Examples">Examples</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a>, <a href="http://www.technorati.com/tag/cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for cmdlets">cmdlets</a>, <a href="http://www.technorati.com/tag/one-liner" target="_blank" rel="tag" title="Link to Technorati Tag category for one-liner">one-liner</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F17%2Fso%2Dwho%2Ddid%2Dwe%2Dhire%2Dlast%2Dmonth%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F17%2Fso%2Dwho%2Ddid%2Dwe%2Dhire%2Dlast%2Dmonth%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F17%2Fso%2Dwho%2Ddid%2Dwe%2Dhire%2Dlast%2Dmonth%2F;title=So%20who%20did%20we%20hire%20last%20month%3F" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=So%20who%20did%20we%20hire%20last%20month%3F&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F17%2Fso%2Dwho%2Ddid%2Dwe%2Dhire%2Dlast%2Dmonth%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F17%2Fso%2Dwho%2Ddid%2Dwe%2Dhire%2Dlast%2Dmonth%2F&amp;Title=So%20who%20did%20we%20hire%20last%20month%3F" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F17%2Fso%2Dwho%2Ddid%2Dwe%2Dhire%2Dlast%2Dmonth%2F&amp;title=So%20who%20did%20we%20hire%20last%20month%3F" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F17%2Fso%2Dwho%2Ddid%2Dwe%2Dhire%2Dlast%2Dmonth%2F&amp;title=So%20who%20did%20we%20hire%20last%20month%3F" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=So%20who%20did%20we%20hire%20last%20month%3F&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F04%2F17%2Fso%2Dwho%2Ddid%2Dwe%2Dhire%2Dlast%2Dmonth%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1149&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/04/17/so-who-did-we-hire-last-month/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
	</channel>
</rss>