<?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>Alfa BBT &#187; LDAP</title>
	<atom:link href="http://blog.koenvermoesen.be/tag/ldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.koenvermoesen.be</link>
	<description>Allways looking for a better Blog Title...</description>
	<lastBuildDate>Tue, 13 Jul 2010 09:33:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.koenvermoesen.be' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/72db48a689a5327f7bba8c9193cac8af?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Alfa BBT &#187; LDAP</title>
		<link>http://blog.koenvermoesen.be</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.koenvermoesen.be/osd.xml" title="Alfa BBT" />
	<atom:link rel='hub' href='http://blog.koenvermoesen.be/?pushpress=hub'/>
		<item>
		<title>Bulk Creating Active Directory groups</title>
		<link>http://blog.koenvermoesen.be/2009/07/15/bulk-creating-active-directory-groups/</link>
		<comments>http://blog.koenvermoesen.be/2009/07/15/bulk-creating-active-directory-groups/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 11:04:43 +0000</pubDate>
		<dc:creator>Stijn Vermoesen</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Quest]]></category>
		<category><![CDATA[LDAP]]></category>

		<guid isPermaLink="false">http://blog.koenvermoesen.be/2009/07/15/bulk-creating-active-directory-groups/</guid>
		<description><![CDATA[One of my colleagues gave me a list of AD groups for the sharepoint environment he&#8217;s confguring. Instead of creating them manually I used the Quest ActiveRoles management shell. import-csv &#8216;SecurityGroups.csv&#8217; &#124; foreach { New-QADGroup -Parent $_.ParentContainer -Name $_.Name -sAM $_.Name -GroupScope $_.GroupScope -GroupType $_.GroupType } This script imports a .csv file to create the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.koenvermoesen.be&blog=3561314&post=442&subd=k0v3&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>One of my colleagues gave me a list of AD groups for the sharepoint environment he&#8217;s confguring. Instead of creating them manually I used the <a href="http://www.quest.com/powershell/activeroles-server.aspx" target="_blank">Quest ActiveRoles management shell</a>.</p>
<blockquote>
<div>import-csv &#8216;SecurityGroups.csv&#8217; | foreach {<br />
New-QADGroup -Parent $_.ParentContainer -Name $_.Name -sAM $_.Name -GroupScope $_.GroupScope -GroupType $_.GroupType<br />
}</div>
</blockquote>
<p>This script imports a .csv file to create the security groups. The .csv file contains the OU distinguished name, the group Name, the group type (security or distribution) and finally the scope (Domain Local, Global or Universal).</p>
<p>It looks like this:</p>
<blockquote><p>Parentcontainer,Name,Grouptype,GroupScope<br />
&#8220;OU=Sharepoint,DC=domain,DC=local&#8221;,SecurityGroup01,Security,DomainLocal</p></blockquote>
<br />Posted in Active Directory, PowerShell, Quest Tagged: LDAP, PowerShell <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/k0v3.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/k0v3.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/k0v3.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/k0v3.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/k0v3.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/k0v3.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/k0v3.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/k0v3.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/k0v3.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/k0v3.wordpress.com/442/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.koenvermoesen.be&blog=3561314&post=442&subd=k0v3&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.koenvermoesen.be/2009/07/15/bulk-creating-active-directory-groups/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62aee00de3e0280aadbe38323469a9be?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">sak1n1</media:title>
		</media:content>
	</item>
		<item>
		<title>ADFind Oneliners</title>
		<link>http://blog.koenvermoesen.be/2009/06/29/adfind-onelines/</link>
		<comments>http://blog.koenvermoesen.be/2009/06/29/adfind-onelines/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 12:51:37 +0000</pubDate>
		<dc:creator>Koen Vermoesen</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[ADFind]]></category>
		<category><![CDATA[LDAP]]></category>

		<guid isPermaLink="false">http://blog.koenvermoesen.be/?p=433</guid>
		<description><![CDATA[I&#8217;m very fond of the powerful AdFind command line utility from joeware.net. Here&#8217;s a little list I&#8217;m keeping for my own reference: Find the user behind a GUID: adfind -binenc -gc -s subtree -b dc=test,dc=com -f &#34;objectGUID={{GUID:????????-????-????-????-????????????}}&#34; displayName Likewise, you can use the same tool to find the e-mail address of a certain user: adfind [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.koenvermoesen.be&blog=3561314&post=433&subd=k0v3&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m very fond of the powerful <a href="http://adfind.joeware.net/freetools/tools/adfind/index.htm">AdFind</a> command line utility from <a href="http://blog.joeware.net/">joeware.net</a>. Here&#8217;s a little list I&#8217;m keeping for my own reference:</p>
<p>Find the user behind a GUID:</p>
<pre class="brush: plain;">adfind -binenc -gc -s subtree -b dc=test,dc=com -f &quot;objectGUID={{GUID:????????-????-????-????-????????????}}&quot; displayName</pre>
<p>Likewise, you can use the same tool to find the e-mail address of a certain user:</p>
<pre class="brush: plain; first-line: 2;">adfind -gc -b dc=???,dc=??? -nodn -nolabel -f &quot;sAMAccountName=??????&quot; mail</pre>
<p>The command above is actually part of script, so I used the &#8220;-nodn&#8221; and &#8220;-nolabel&#8221; parameters to have the tool only return the e-mail address. You obviously need to replace the question marks with something meaningful in the examples above.</p>
<p>List all distribution groups:</p>
<pre class="brush: plain; first-line: 3;">adfind -csv -nodn -f &quot;(&amp;(objectcategory=group)(mail=*))&quot; displayname</pre>
<p>List all contacts:</p>
<pre class="brush: plain; first-line: 4;">adfind -csv -nodn -f &quot;(&amp;(&amp;(&amp; (mailnickname=*) (| (&amp;(objectCategory=person)(objectClass=contact)) ))))&quot; displayname</pre>
<p>List all mailbox-enabled users:</p>
<pre class="brush: plain; first-line: 5;">adfind -csv -nodn -f &quot;(&amp;(&amp;(&amp; (mailnickname=*) (| (&amp;(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) ))))&quot; displayname</pre>
<p>Run a query against another domain:</p>
<pre class="brush: plain; first-line: 6;">adfind -h %servername% -u %domain%\%username% -up %password% -csv -nodn -f &quot;displayname=John Doe&quot; displayname</pre>
<p>List all the members of a DL (and optionally use the resulting dn to retrieve some more readable information):</p>
<pre class="brush: plain; first-line: 7;">adfind -list -f &quot;DisplayName=%displayname%&quot; member
adfind -list -f &quot;DisplayName=%displayname%&quot; member | adfind -csv -nodn mailnickname displayname mail</pre>
<p>Report on the usage of Extension Attributes:</p>
<pre class="brush: plain; first-line: 9;">adfind -csv -nodn -f &quot;(|(ExtensionAttribute1=*)(ExtensionAttribute2=*)(ExtensionAttribute3=*)(ExtensionAttribute4=*)(ExtensionAttribute5=*)(ExtensionAttribute6=*)(ExtensionAttribute7=*)(ExtensionAttribute8=*)(ExtensionAttribute9=*)(ExtensionAttribute10=*)(ExtensionAttribute11=*)(ExtensionAttribute12=*)(ExtensionAttribute13=*)(ExtensionAttribute14=*)(ExtensionAttribute15=*))&quot; displayname ExtensionAttribute1 ExtensionAttribute2 ExtensionAttribute3 ExtensionAttribute4 ExtensionAttribute5 ExtensionAttribute6 ExtensionAttribute7 ExtensionAttribute8 ExtensionAttribute9 ExtensionAttribute10 ExtensionAttribute11 ExtensionAttribute12 ExtensionAttribute13 ExtensionAttribute14 ExtensionAttribute15</pre>
<p>Count the number of mailboxes on an exchange server:</p>
<pre class="brush: plain; first-line: 10;">adfind -c -f &quot;msExchHomeServerName=/o=EMS/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=%servername%&quot;</pre>
<p>Imagine you&#8217;re working as a consultant/contractor for a large organisation and you want to know the end date of you contract:</p>
<pre class="brush: plain; first-line: 11;">adfind -tdcs -f &quot;samaccountname=%UserName%&quot; accountExpires</pre>
<p>The &#8220;tdcs&#8221; parameter converts the time in a human readable format.</p>
<p>Somebody called you on your mobile phone and you want to know who:</p>
<pre class="brush: plain; first-line: 12;">adfind -list -f &quot;telephoneNumber=*%extension%&quot; displayname</pre>
<p>More info</p>
<ul>
<li><a href="http://www.msexchange.org/articles/Scripting-Exchange-VBScript-ADSI-Part1.html">msexchange.org</a></li>
<li><a href="http://theessentialexchange.com/blogs/michael/archive/2007/11/13/listing-members-of-distribution-lists-and-security-groups.aspx">theessentialexchange.com</a></li>
<li><a href="http://www.petri.co.il/forums/showthread.php?t=17675">petri.co.il</a></li>
<li><a href="http://www.petri.co.il/ldap_search_samples_for_windows_2003_and_exchange.htm">petri.co.il</a></li>
</ul>
<br />Posted in Active Directory, Scripting Tagged: ADFind, LDAP <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/k0v3.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/k0v3.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/k0v3.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/k0v3.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/k0v3.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/k0v3.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/k0v3.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/k0v3.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/k0v3.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/k0v3.wordpress.com/433/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.koenvermoesen.be&blog=3561314&post=433&subd=k0v3&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.koenvermoesen.be/2009/06/29/adfind-onelines/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f646bcfc3f7534b20fa79e0347353eb?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">k0v3</media:title>
		</media:content>
	</item>
	</channel>
</rss>