<?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 Rename an Active Directory Group?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/12/14/how-can-i-rename-an-active-directory-group.aspx</link><description>Hey, Scripting Guy! How can I rename an Active Directory group? -- CL 
 Hey, CL. This is actually pretty easy; as you’ll see, it only takes two lines of code. It’s not a hard problem, it’s just a little bit tricky. That’s because ADSI (at least when</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 Rename an Active Directory Group?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/12/14/how-can-i-rename-an-active-directory-group.aspx#3550872</link><pubDate>Wed, 06 Feb 2013 17:51:19 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3550872</guid><dc:creator>Christian</dc:creator><description>&lt;p&gt;using System;&lt;/p&gt;
&lt;p&gt;using System.DirectoryServices;&lt;/p&gt;
&lt;p&gt;public class RenameObject&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; public static void Main()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;DirectoryEntry de = new DirectoryEntry(&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;LDAP://192.168.1.100/ou=auditing, ou=accounting, dc=ispnet1, dc=net&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;cn=Administrator, dc=ispnet1, dc=net&amp;quot;, &amp;quot;password&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AuthenticationTypes.ServerBind);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;DirectoryEntries des = de.Children;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;DirectoryEntry badObject = des.Find(&amp;quot;cn=test&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;badObject.Rename(&amp;quot;cn=testing&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;de.CommitChanges();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;de.Close();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3550872" width="1" height="1"&gt;</description></item></channel></rss>