<?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; outlookwebaccess</title>
	<atom:link href="http://vbscriptblog.com/category/vbscript/active-directory/outlookwebaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://vbscriptblog.com</link>
	<description>Scripting for Windows Sysadmins</description>
	<lastBuildDate>Wed, 11 Apr 2012 07:23:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Active Directory: Vbscript to enumerate the owa (outlook web access) settings of all users of a nested group</title>
		<link>http://vbscriptblog.com/vbscript/active-directory-vbscript-to-enumerate-the-owa-outlook-web-access-settings-of-all-users-of-a-nested-group/</link>
		<comments>http://vbscriptblog.com/vbscript/active-directory-vbscript-to-enumerate-the-owa-outlook-web-access-settings-of-all-users-of-a-nested-group/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 13:23:08 +0000</pubDate>
		<dc:creator>dirk adamsky</dc:creator>
				<category><![CDATA[active directory]]></category>
		<category><![CDATA[outlookwebaccess]]></category>
		<category><![CDATA[vbscript]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[cscript]]></category>
		<category><![CDATA[enumerate]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[vb]]></category>
		<category><![CDATA[vbs]]></category>

		<guid isPermaLink="false">http://deludi.nl/blog/?p=567</guid>
		<description><![CDATA[Hmmmm I&#8217;m bored of myself: today&#8217;s script is another mutation of my enumerate nested group script. Added are the owa (outlook web access) settings of all users. When a user has owa the last value of each line is &#8220;yes&#8221;. The owa settings for win/exchange 2003 are found through the user attribute &#8220;protocolSettings&#8221;. Default setting [...]]]></description>
			<content:encoded><![CDATA[<p>Hmmmm I&#8217;m bored of myself: today&#8217;s script is another mutation of my enumerate nested group script.<br />
Added are the owa (outlook web access) settings of all users. When a user has owa the last value of each line is &#8220;yes&#8221;. The owa settings for win/exchange 2003 are found through the user attribute &#8220;protocolSettings&#8221;.<br />
Default setting for owa is &#8220;on&#8221;. The array protocolsettings has no specific owa entry at that moment.<br />
When owa is explicitely denied the setting is created, when owa is enabled again this setting is altered.</p>
<p>Follow the next steps to run the script  (no admin rights needed):</p>
<ul>
<li>copy and paste the script in your favorite text editor</li>
<li>change the distinguished name of the nested group to your group distinguished name</li>
<li>save the script (for example c:tempenumeratenestedgroupowa.vbs)</li>
<li>open a command prompt</li>
<li>go to &#8220;c:temp&#8221;</li>
<li>give &#8220;cscript enumeratenestedgroupowa.vbs&#8221; (without quotes) and enter</li>
</ul>
<p>The script:</p>
<pre class="brush: vb; title: ; notranslate">
' Name : enumeratenestedgroupowa.vbs
' Description : script to enumerate the owa (outlook web access) settings of all users of a nested group
' Author : dirk adamsky - deludi bv
' Version : 1.00
' Date : 15-04-2010
' Level: intermediate

strTargetGroupDN = &quot;LDAP://CN=testgroup,OU=Groups,DC=test,DC=org&quot;
EnumNestedgroup strTargetGroupDN
Sub EnumNestedgroup(strGroupDN)
	Set objGroup = GetObject(strGroupDN)
	For Each objMember in objGroup.Members
		If (LCase(objMember.Class) = &quot;group&quot;) Then
			EnumNestedgroup objMember.AdsPath
		Else
			strOwa = &quot;Yes&quot;
			If TypeName(objMember.[protocolSettings]) = &quot;Variant()&quot; Then
				arrProtocolsettings = objMember.[protocolSettings]
				For Each Protocol in arrProtocolsettings
					If Protocol = &quot;HTTP§0§1§§§§§§&quot; Then
					strOWA = &quot;No&quot;
				End If
			Next
		End If
		Wscript.Echo objMember.DisplayName &amp; &quot; ; &quot; &amp; objMember.Mail &amp; &quot; ; &quot; &amp; strOWA
		End If
	Next
	Set objGroup = Nothing
End Sub
</pre>
<p>When you have problems/questions please post a reply or give a &#8216;star&#8217; rating.</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-vbscript-to-enumerate-the-owa-outlook-web-access-settings-of-all-users-of-a-nested-group%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" allowTransparency="true" style="border:none; overflow:hidden; width:85px; height:21px;"></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-vbscript-to-enumerate-the-owa-outlook-web-access-settings-of-all-users-of-a-nested-group/"></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-vbscript-to-enumerate-the-owa-outlook-web-access-settings-of-all-users-of-a-nested-group/"  data-text="Active Directory: Vbscript to enumerate the owa (outlook web access) settings of all users of a nested group" data-count="horizontal" data-via="dirkadamsky"></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-vbscript-to-enumerate-the-owa-outlook-web-access-settings-of-all-users-of-a-nested-group/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://vbscriptblog.com/vbscript/active-directory-vbscript-to-enumerate-the-owa-outlook-web-access-settings-of-all-users-of-a-nested-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active Directory: Vbscript to enumerate all users with Outlook Web Access (owa)</title>
		<link>http://vbscriptblog.com/vbscript/active-directory/outlookwebaccess/active-directory-vbscript-to-enumerate-all-users-with-outlook-web-access-owa/</link>
		<comments>http://vbscriptblog.com/vbscript/active-directory/outlookwebaccess/active-directory-vbscript-to-enumerate-all-users-with-outlook-web-access-owa/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 09:22:30 +0000</pubDate>
		<dc:creator>dirk adamsky</dc:creator>
				<category><![CDATA[outlookwebaccess]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[cscript]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[enumerate]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[outlook web access]]></category>
		<category><![CDATA[protocolsettings]]></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=448</guid>
		<description><![CDATA[Outlook web access is incorporated in Active Directory through the user attribute &#8220;protocolSettings&#8221;. Default setting is for owa is &#8216;enabled&#8217;. The attribute &#8216;protocolSettings&#8217; has no specific entry for owa at this stage. Only when owa is explicitly denied for a specific user an entry is added, the value of this entry is: HTTP§0§1§§§§§§. When owa [...]]]></description>
			<content:encoded><![CDATA[<p>Outlook web access is incorporated in Active Directory through the user attribute &#8220;protocolSettings&#8221;.<br />
Default setting is for owa is &#8216;enabled&#8217;. The attribute &#8216;protocolSettings&#8217; has no specific entry for owa at this stage. Only when owa is explicitly denied for a specific user an entry is added, the value of this entry is:<br />
HTTP§0§1§§§§§§. When owa is enabled again for this user the value changes to HTTP§0§0§§§§§§.<br />
This script is tested for outlook/exchange2003.</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:tempowausers.vbs)<br />
* open a command prompt<br />
* go to &#8220;c:temp&#8221;<br />
* give &#8220;cscript owausers.vbs&#8221; (without quotes) and enter</p>
<p>The script:</p>
<pre class="brush: vb; title: ; notranslate">
' Name : owausers.vbs
' Description : script to enumerate all users with Outlook Web Access (owa)
' Author : dirk adamsky - deludi bv
' Version : 1.00
' Date : 22-03-2010
' Level : intermediate

Set objCommand = CreateObject(&quot;ADODB.Command&quot;)
Set objConnection = CreateObject(&quot;ADODB.Connection&quot;)
objConnection.Provider = &quot;ADsDSOObject&quot;
objConnection.Open &quot;Active Directory Provider&quot;
objCommand.ActiveConnection = objConnection

Set objRootDSE = GetObject(&quot;LDAP://RootDSE&quot;)
strBase = &quot;&lt;LDAP://&quot; &amp; objRootDSE.Get(&quot;defaultNamingContext&quot;) &amp; &quot;&gt;&quot;
Set objRootDSE = Nothing

strFilter = &quot;(&amp;(objectCategory=person)(objectClass=user)(mail=*)(!(cn=systemmailbox*)))&quot;
strAttributes = &quot;distinguishedname, mail, displayname, protocolSettings&quot;
strQuery = strBase &amp; &quot;;&quot; &amp; strFilter &amp; &quot;;&quot; &amp; strAttributes &amp; &quot;;subtree&quot;
objCommand.CommandText = strQuery
objCommand.Properties(&quot;Page Size&quot;) = 100
objCommand.Properties(&quot;Timeout&quot;) = 30
objCommand.Properties(&quot;Cache Results&quot;) = False

Set objRecordSet = objCommand.Execute
Do Until objRecordSet.EOF
	strOwa = &quot;Yes&quot;
	If TypeName(objRecordSet.Fields(&quot;protocolSettings&quot;).value) = &quot;Variant()&quot; Then
		arrProtocolsettings = objRecordSet.Fields(&quot;protocolSettings&quot;).value
		For Each Protocol in arrProtocolsettings
			If Protocol = &quot;HTTP§0§1§§§§§§&quot; Then
				strOWA = &quot;No&quot;
			End If
		Next
	End If
	Wscript.Echo objRecordSet.Fields(&quot;displayname&quot;).Value &amp; &quot; uses outlook web access = &quot; &amp; strOwa
	objRecordSet.MoveNext
Loop

objRecordSet.Close
objConnection.Close

Set objRecordSet = Nothing
Set objConnection = Nothing
Set objCommand = Nothing
</pre>
<p>When you have problems/questions please post a reply, you can also rate the script.</p>
<p>Happy scripting.</p>
<p>Best regards,</p>
<p>Dirk Adamsky &#8211; Deludi BV</p>
<p>[adrotate group="1"] </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%2Foutlookwebaccess%2Factive-directory-vbscript-to-enumerate-all-users-with-outlook-web-access-owa%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" allowTransparency="true" style="border:none; overflow:hidden; width:85px; height:21px;"></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/outlookwebaccess/active-directory-vbscript-to-enumerate-all-users-with-outlook-web-access-owa/"></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/outlookwebaccess/active-directory-vbscript-to-enumerate-all-users-with-outlook-web-access-owa/"  data-text="Active Directory: Vbscript to enumerate all users with Outlook Web Access (owa)" data-count="horizontal" data-via="dirkadamsky"></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/outlookwebaccess/active-directory-vbscript-to-enumerate-all-users-with-outlook-web-access-owa/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://vbscriptblog.com/vbscript/active-directory/outlookwebaccess/active-directory-vbscript-to-enumerate-all-users-with-outlook-web-access-owa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

