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

<channel>
	<title>vbscriptblog.com &#187; outlook</title>
	<atom:link href="http://vbscriptblog.com/category/vbscript/active-directory/outlook/feed/" rel="self" type="application/rss+xml" />
	<link>http://vbscriptblog.com</link>
	<description>Scripting for Windows Sysadmins</description>
	<lastBuildDate>Mon, 16 Jan 2012 09:41:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Active Directory: VBscript to enumerate the Outlook details of all enabled users in your company</title>
		<link>http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-enabled-users-in-your-company/</link>
		<comments>http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-enabled-users-in-your-company/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 13:27:17 +0000</pubDate>
		<dc:creator>dirk adamsky</dc:creator>
				<category><![CDATA[outlook]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[cscript]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[disabled]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[enumerate]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[smtp address]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[vbs]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://deludi.nl/blog/?p=351</guid>
		<description><![CDATA[Ok today it is modification day. This script is a modification of the previous outlook details script. The modification is in the filter at line number 25: the filter attribute userAccountControl with value 512 is added. A value of 512 stands for an enabled user. When you want to reverse the output to all disabled [...]]]></description>
			<content:encoded><![CDATA[<p>Ok today it is modification day.<br />
This script is a modification of the previous <a href="http://deludi.nl/blog/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-users-in-your-company/">outlook details script</a>.<br />
The modification is in the filter at line number 25: the filter attribute userAccountControl with value 512 is added. A value of 512 stands for an enabled user. When you want to reverse the output to all disabled users change the value of userAccountControl to 514.</p>
<p>Follow the next steps to run the script (no admin rights needed):</p>
<p>* open your favorite text editor<br />
* copy and paste the script into the editor<br />
* save the script (for example c:tempoutlookdetails-enabled-users.vbs)<br />
* open a command prompt<br />
* go to &#8220;c:temp&#8221;<br />
* give &#8220;cscript outlookdetails-enabled-users.vbs&#8221; (without quotes) and enter</p>
<p>The script:</p>
<pre class="brush: vb; title: ; notranslate">
' Name : outlookdetails-enabled-users.vbs
' Description : script to enumerate the Outlook details of all enabled users in your company
' Author : dirk adamsky - deludi bv
' Version : 1.00
' Date : 23-02-2010
' Level : intermediate

Option Explicit
Dim adoCommand, adoConnection, strBase, strFilter, strAttributes
Dim objRootDSE, strDNSDomain, strQuery, adoRecordset, strUserDN, objUser, protocolSettings, strUser

' Setup ADO objects.
Set adoCommand = CreateObject(&quot;ADODB.Command&quot;)
Set adoConnection = CreateObject(&quot;ADODB.Connection&quot;)
adoConnection.Provider = &quot;ADsDSOObject&quot;
adoConnection.Open &quot;Active Directory Provider&quot;
adoCommand.ActiveConnection = adoConnection

' Search entire Active Directory domain.
Set objRootDSE = GetObject(&quot;LDAP://RootDSE&quot;)
strDNSDomain = objRootDSE.Get(&quot;defaultNamingContext&quot;)
strBase = &quot;&lt;LDAP://&quot; &amp; strDNSDomain &amp; &quot;&gt;&quot;

' Filter on user objects.
strFilter = &quot;(&amp;(objectCategory=person)(objectClass=user)(userAccountControl=512))&quot;

' Comma delimited list of attribute values to retrieve.
strAttributes = &quot;mail,givenname,initials,sn,displayname,mailNickname,postalAddress,title,company,l,department,
st,streetAddress,postalCode,co,telephoneNumber,mobile,info,physicalDeliveryOfficeName&quot;

' Construct the LDAP syntax query.
strQuery = strBase &amp; &quot;;&quot; &amp; strFilter &amp; &quot;;&quot; &amp; strAttributes &amp; &quot;;subtree&quot;
adoCommand.CommandText = strQuery
adoCommand.Properties(&quot;Page Size&quot;) = 100
adoCommand.Properties(&quot;Timeout&quot;) = 30
adoCommand.Properties(&quot;Cache Results&quot;) = False

' Run the query.
Set adoRecordset = adoCommand.Execute

' Enumerate the resulting recordset.
Do Until adoRecordset.EOF
    If adoRecordset.Fields(&quot;mail&quot;).Value &lt;&gt; &quot;&quot; Then
        If Left(adoRecordset.Fields(&quot;mail&quot;).Value, 13) &lt;&gt; &quot;SystemMailbox&quot; Then
            wscript.echo adoRecordset.Fields(&quot;mail&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;givenname&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;initials&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;sn&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;displayname&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;mailNickname&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;postalAddress&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;title&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;company&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;l&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;department&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;st&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;streetAddress&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;postalCode&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;co&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;physicalDeliveryOfficeName&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;telephoneNumber&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;mobile&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;info&quot;).Value
		End If
	End If
	'Move to the next record in the recordset.
    adoRecordset.MoveNext
Loop
' Clean up.
adoRecordset.Close
adoConnection.Close

Set adoRecordset = Nothing
Set objRootDSE = Nothing
Set adoConnection = Nothing
Set adoCommand = Nothing
</pre>
<p>When you have problems/questions please post a reply.</p>
<p>Happy scripting.</p>
<p>Best regards,</p>
<p>Dirk Adamsky &#8211; Deludi BV</p>
<p>[adrotate group="2"] </p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fvbscriptblog.com%2Fvbscript%2Factive-directory%2Foutlook%2Factive-directory-vbscript-to-enumerate-the-outlook-details-of-all-enabled-users-in-your-company%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-enabled-users-in-your-company/"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-enabled-users-in-your-company/"  data-text="Active Directory: VBscript to enumerate the Outlook details of all enabled users in your company" data-count="horizontal" data-via="dirkadamsky">Tweet</a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-enabled-users-in-your-company/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-enabled-users-in-your-company/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active Directory: VBscript to enumerate the Outlook details of all users in your company</title>
		<link>http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-users-in-your-company/</link>
		<comments>http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-users-in-your-company/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 12:11:57 +0000</pubDate>
		<dc:creator>dirk adamsky</dc:creator>
				<category><![CDATA[outlook]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[cscript]]></category>
		<category><![CDATA[details]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[enumerate]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[smtp address]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[vb]]></category>
		<category><![CDATA[vbs]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://deludi.nl/blog/?p=263</guid>
		<description><![CDATA[Today&#8217;s script gives you almost all user details that are visible in Outlook. It is tested with Exchange-Outlook 2003. The script itself is a regular ADO query only pimped with a lot of attributes (19 to be precisely). Follow the next steps to run the script (no admin rights needed): * open your favorite text [...]]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s script gives you almost all user details that are visible in Outlook.<br />
It is tested with Exchange-Outlook 2003.<br />
The script itself is a regular ADO query only pimped with a lot of attributes (19 to be precisely).</p>
<p>Follow the next steps to run the script (no admin rights needed):</p>
<p>* open your favorite text editor<br />
* copy and paste the script into the editor<br />
* save the script (for example c:tempoutlookdetails.vbs)<br />
* open a command prompt<br />
* go to &#8220;c:temp&#8221;<br />
* give &#8220;cscript outlookdetails.vbs&#8221; (without quotes) and enter</p>
<p>The script:</p>
<pre class="brush: vb; title: ; notranslate">
' Name : outlookdetails.vbs
' Description : script to enumerate the Outlook details of all users in your company
' Author : dirk adamsky - deludi bv
' Version : 1.00
' Date : 09-02-2010
' Level : intermediate

Option Explicit
Dim adoCommand, adoConnection, strBase, strFilter, strAttributes
Dim objRootDSE, strDNSDomain, strQuery, adoRecordset, strUserDN, objUser, protocolSettings, strUser

' Setup ADO objects.
Set adoCommand = CreateObject(&quot;ADODB.Command&quot;)
Set adoConnection = CreateObject(&quot;ADODB.Connection&quot;)
adoConnection.Provider = &quot;ADsDSOObject&quot;
adoConnection.Open &quot;Active Directory Provider&quot;
adoCommand.ActiveConnection = adoConnection

' Search entire Active Directory domain.
Set objRootDSE = GetObject(&quot;LDAP://RootDSE&quot;)
strDNSDomain = objRootDSE.Get(&quot;defaultNamingContext&quot;)
strBase = &quot;&lt;LDAP://&quot; &amp; strDNSDomain &amp; &quot;&gt;&quot;

' Filter on user objects.
strFilter = &quot;(&amp;(objectCategory=person)(objectClass=user))&quot;

' Comma delimited list of attribute values to retrieve.
strAttributes = &quot;mail,givenname,initials,sn,displayname,mailNickname,postalAddress,title,company,l,department,
st,streetAddress,postalCode,co,telephoneNumber,mobile,info,physicalDeliveryOfficeName&quot;

' Construct the LDAP syntax query.
strQuery = strBase &amp; &quot;;&quot; &amp; strFilter &amp; &quot;;&quot; &amp; strAttributes &amp; &quot;;subtree&quot;
adoCommand.CommandText = strQuery
adoCommand.Properties(&quot;Page Size&quot;) = 100
adoCommand.Properties(&quot;Timeout&quot;) = 30
adoCommand.Properties(&quot;Cache Results&quot;) = False

' Run the query.
Set adoRecordset = adoCommand.Execute

' Enumerate the resulting recordset.
Do Until adoRecordset.EOF
    If adoRecordset.Fields(&quot;mail&quot;).Value &lt;&gt; &quot;&quot; Then
        If Left(adoRecordset.Fields(&quot;mail&quot;).Value, 13) &lt;&gt; &quot;SystemMailbox&quot; Then
            wscript.echo adoRecordset.Fields(&quot;mail&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;givenname&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;initials&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;sn&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;displayname&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;mailNickname&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;postalAddress&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;title&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;company&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;l&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;department&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;st&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;streetAddress&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;postalCode&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;co&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;physicalDeliveryOfficeName&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;telephoneNumber&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;mobile&quot;).Value &amp;_
            &quot;;&quot; &amp; adoRecordset.Fields(&quot;info&quot;).Value
		End If
	End If
	'Move to the next record in the recordset.
    adoRecordset.MoveNext
Loop
' Clean up.
adoRecordset.Close
adoConnection.Close

Set adoRecordset = Nothing
Set objRootDSE = Nothing
Set adoConnection = Nothing
Set adoCommand = Nothing
</pre>
<p>When you have problems/questions please post a reply.</p>
<p>Happy scripting.</p>
<p>Best regards,</p>
<p>Dirk Adamsky &#8211; Deludi BV</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fvbscriptblog.com%2Fvbscript%2Factive-directory%2Foutlook%2Factive-directory-vbscript-to-enumerate-the-outlook-details-of-all-users-in-your-company%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-users-in-your-company/"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-users-in-your-company/"  data-text="Active Directory: VBscript to enumerate the Outlook details of all users in your company" data-count="horizontal" data-via="dirkadamsky">Tweet</a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-users-in-your-company/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://vbscriptblog.com/vbscript/active-directory/outlook/active-directory-vbscript-to-enumerate-the-outlook-details-of-all-users-in-your-company/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

