0

Active Directory: Vbscript to enumerate the owa (outlook web access) settings of all users of a nested group

Hmmmm I’m bored of myself: today’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 “yes”. The owa settings for win/exchange 2003 are found through the user attribute “protocolSettings”.
Default setting for owa is “on”. The array protocolsettings has no specific owa entry at that moment.
When owa is explicitely denied the setting is created, when owa is enabled again this setting is altered.

Follow the next steps to run the script (no admin rights needed):

  • copy and paste the script in your favorite text editor
  • change the distinguished name of the nested group to your group distinguished name
  • save the script (for example c:tempenumeratenestedgroupowa.vbs)
  • open a command prompt
  • go to “c:temp”
  • give “cscript enumeratenestedgroupowa.vbs” (without quotes) and enter

The script:

' 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 = "LDAP://CN=testgroup,OU=Groups,DC=test,DC=org"
EnumNestedgroup strTargetGroupDN
Sub EnumNestedgroup(strGroupDN)
	Set objGroup = GetObject(strGroupDN)
	For Each objMember in objGroup.Members
		If (LCase(objMember.Class) = "group") Then
			EnumNestedgroup objMember.AdsPath
		Else
			strOwa = "Yes"
			If TypeName(objMember.[protocolSettings]) = "Variant()" Then
				arrProtocolsettings = objMember.[protocolSettings]
				For Each Protocol in arrProtocolsettings
					If Protocol = "HTTP§0§1§§§§§§" Then
					strOWA = "No"
				End If
			Next
		End If
		Wscript.Echo objMember.DisplayName & " ; " & objMember.Mail & " ; " & strOWA
		End If
	Next
	Set objGroup = Nothing
End Sub

When you have problems/questions please post a reply or give a ‘star’ rating.

Happy scripting.

Best regards,

Dirk Adamsky – Deludi BV


Related Posts:
  • Active Directory and WMI: VBscript to enumerate a sorted list of all mailboxes and their size in your AD domain
  • Active Directory And WMI: VBscript to monitor all servers in Active Directory
  • Active Directory: VBscript to show all groups with multiple smtp addresses

  • Leave a Reply