<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How Can I Determine the OU a User Account Belongs To?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/21/how-can-i-determine-the-ou-a-user-account-belongs-to.aspx</link><description>Hey, Scripting Guy! How do I determine the OU a user account belongs to? -- CO 
 Hey, CO. Ah, yes: the OU a user belongs to. No doubt a lot of you are thinking, “Well, there’s probably an OU property of some kind in Active Directory that gives you that</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How Can I Determine the OU a User Account Belongs To?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/21/how-can-i-determine-the-ou-a-user-account-belongs-to.aspx#3566941</link><pubDate>Mon, 15 Apr 2013 23:16:57 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3566941</guid><dc:creator>Alex Cooksey</dc:creator><description>&lt;p&gt;In the &amp;quot;Find Users&amp;quot; function of AD, after searching for the user, you can change the View &amp;gt; Choose Columns &amp;gt; and then add the column &amp;quot;Distinguished users&amp;quot;. This will give you the &amp;quot;CN=Domain Users,CN=Users,CN=NY Office..&amp;quot; etc. and you can then find the location of the user account by following the path given in the distinguished name. &lt;/p&gt;
&lt;p&gt;If I&amp;#39;ve offered an answer that was not asked above is too simple, just ignore this..&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3566941" width="1" height="1"&gt;</description></item><item><title>re: How Can I Determine the OU a User Account Belongs To?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/21/how-can-i-determine-the-ou-a-user-account-belongs-to.aspx#3419040</link><pubDate>Wed, 06 Apr 2011 12:34:43 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3419040</guid><dc:creator>Tanskie</dc:creator><description>&lt;p&gt;Nice one! how about if you have a list of users on an excel file? How can we modify the script that it will update the excel file with the OU path of the user?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3419040" width="1" height="1"&gt;</description></item><item><title>re: How Can I Determine the OU a User Account Belongs To?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/21/how-can-i-determine-the-ou-a-user-account-belongs-to.aspx#3386211</link><pubDate>Wed, 09 Feb 2011 18:51:16 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3386211</guid><dc:creator>IamMred</dc:creator><description>&lt;p&gt;No problem, glad you got it working. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3386211" width="1" height="1"&gt;</description></item><item><title>re: How Can I Determine the OU a User Account Belongs To?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/21/how-can-i-determine-the-ou-a-user-account-belongs-to.aspx#3386123</link><pubDate>Wed, 09 Feb 2011 13:53:01 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3386123</guid><dc:creator>Evan Sullivan</dc:creator><description>&lt;p&gt;I got it working, sorry!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3386123" width="1" height="1"&gt;</description></item><item><title>re: How Can I Determine the OU a User Account Belongs To?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/21/how-can-i-determine-the-ou-a-user-account-belongs-to.aspx#3386116</link><pubDate>Wed, 09 Feb 2011 13:33:27 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3386116</guid><dc:creator>Evan Sullivan</dc:creator><description>&lt;p&gt;Sorry, Line 13 which is:&lt;/p&gt;
&lt;p&gt;&amp;quot;SELECT distinguishedName FROM &amp;#39;LDAP://dc=DOMAIN,dc=local&amp;#39; “ &amp;amp; _&amp;quot;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3386116" width="1" height="1"&gt;</description></item><item><title>re: How Can I Determine the OU a User Account Belongs To?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/21/how-can-i-determine-the-ou-a-user-account-belongs-to.aspx#3386115</link><pubDate>Wed, 09 Feb 2011 13:31:45 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3386115</guid><dc:creator>Evan Sullivan</dc:creator><description>&lt;p&gt;I am trying to use this script, I replaced for my domain, but I am getting &amp;quot;Unterminated string constant&amp;quot; on line 11 Char 71.&lt;/p&gt;
&lt;p&gt;Any help?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3386115" width="1" height="1"&gt;</description></item></channel></rss>