<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=Export_receipts.vbs</id>
	<title>Export receipts.vbs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=Export_receipts.vbs"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Export_receipts.vbs&amp;action=history"/>
	<updated>2026-04-30T08:28:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Export_receipts.vbs&amp;diff=6980&amp;oldid=prev</id>
		<title>Dubiousjim: Category:Mail</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Export_receipts.vbs&amp;diff=6980&amp;oldid=prev"/>
		<updated>2012-03-21T15:44:42Z</updated>

		<summary type="html">&lt;p&gt;Category:Mail&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:44, 21 March 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l177&quot;&gt;Line 177:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 177:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  objOutputFile.Write strResult&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  objOutputFile.Write strResult&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Mail]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dubiousjim</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Export_receipts.vbs&amp;diff=2812&amp;oldid=prev</id>
		<title>Djhughes: tidied up so code looks neater</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Export_receipts.vbs&amp;diff=2812&amp;oldid=prev"/>
		<updated>2009-05-22T08:10:49Z</updated>

		<summary type="html">&lt;p&gt;tidied up so code looks neater&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:10, 22 May 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;#039;==================================================================================================&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;#039;==================================================================================================&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;#039; NAME: PostfixAddressExtract.VBS&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;#039; NAME: PostfixAddressExtract.VBS&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l175&quot;&gt;Line 175:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 176:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Set objOutputFile = objFileSystem.CreateTextFile(&amp;quot;C:\Inetpub\wwwroot\virtual.txt&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Set objOutputFile = objFileSystem.CreateTextFile(&amp;quot;C:\Inetpub\wwwroot\virtual.txt&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  objOutputFile.Write strResult&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  objOutputFile.Write strResult&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Djhughes</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Export_receipts.vbs&amp;diff=2316&amp;oldid=prev</id>
		<title>Clandmeter: New page:  &#039;==================================================================================================  &#039; NAME: PostfixAddressExtract.VBS  &#039; VERSION: 1.0  &#039; AUTHOR: Bharat Suneja (altered by...</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Export_receipts.vbs&amp;diff=2316&amp;oldid=prev"/>
		<updated>2008-06-06T14:36:34Z</updated>

		<summary type="html">&lt;p&gt;New page:  &amp;#039;==================================================================================================  &amp;#039; NAME: PostfixAddressExtract.VBS  &amp;#039; VERSION: 1.0  &amp;#039; AUTHOR: Bharat Suneja (altered by...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; &amp;#039;==================================================================================================&lt;br /&gt;
 &amp;#039; NAME: PostfixAddressExtract.VBS&lt;br /&gt;
 &amp;#039; VERSION: 1.0&lt;br /&gt;
 &amp;#039; AUTHOR: Bharat Suneja (altered by Lee Monamy)&lt;br /&gt;
 &amp;#039; LAST MODIFIED : 16/08/2007&lt;br /&gt;
 &amp;#039;==================================================================================================&lt;br /&gt;
 &amp;#039; COMMENT: Based on LISTPROXYADDRESSES.VBS/LISTEMAILADDRESSES.VBS by Bharat Suneja&lt;br /&gt;
 &amp;#039;          http://exchangepedia.com/blog/2005/09/how-to-export-all-email-addresses-from.html&lt;br /&gt;
 &amp;#039;          but altered to:&lt;br /&gt;
 &amp;#039;          o  strip out cn, mail, etc entries&lt;br /&gt;
 &amp;#039;          o  strip out .local addresses&lt;br /&gt;
 &amp;#039;          o  remove a bunch of extra CRLFs&lt;br /&gt;
 &amp;#039;          o  remove the &amp;quot;SMTP:&amp;quot; or &amp;quot;smtp:&amp;quot; prefix from addresses (x = Right(x), Len(x) -5))&lt;br /&gt;
 &amp;#039;          o  put the display name commented out just before the email addresses&lt;br /&gt;
 &amp;#039;          o  append &amp;quot;   OK&amp;quot; after just the email address (sans SMTP: prefix)&lt;br /&gt;
 &amp;#039;          Run the script (double-click) and the output appears in a dialog.  It is also written&lt;br /&gt;
 &amp;#039;          to C:\proxyaddresses.txt.  You should be able to copy this file to your spam filter and&lt;br /&gt;
 &amp;#039;          simply postmap it with no further processing required.&lt;br /&gt;
 &amp;#039;          DISCLAIMER: THIS SCRIPT IS ENTIRELY UNSUPPORTED.  USE AT YOUR OWN RISK.  NOBODY BUT YOU&lt;br /&gt;
 &amp;#039;          IS RESPONSIBLE IF THIS SCRIPT DELETES THE CONTENTS OF YOUR ACTIVE DIRECTORY OR SETS FIRE&lt;br /&gt;
 &amp;#039;          TO YOUR CAT.  CAVEAT EMPTOR.&lt;br /&gt;
 &amp;#039;          LICENCE: Unknown, as this is pretty much Bharat Suneja&amp;#039;s script with minor changes, and&lt;br /&gt;
 &amp;#039;          there was no licence mentioned originally.  Otherwise, LGPL.  Do what you like.&lt;br /&gt;
 &amp;#039;          This has been tested on several SBS 2003 installations and Works For Me, and does what I&lt;br /&gt;
 &amp;#039;          need.  I hope you find it useful.&lt;br /&gt;
 &amp;#039;          Thanks to Gary V (http://www200.pair.com/mecham/spam/) &amp;amp; freespamfilter.org for their&lt;br /&gt;
 &amp;#039;          truly excellent documentation!&lt;br /&gt;
 &amp;#039;==================================================================================================&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;Set up constant for deleting values from multivalued attribute memberOf&lt;br /&gt;
&lt;br /&gt;
 Const ADS_PROPERTY_NOT_FOUND  = &amp;amp;h8000500D&lt;br /&gt;
 Const ADS_UF_ACCOUNTDISABLE = 2                       &amp;#039;For UserAccountControl&lt;br /&gt;
 Const strX400Search = &amp;quot;x400&amp;quot;&lt;br /&gt;
 Const LocSearch = &amp;quot;.local&amp;quot;&lt;br /&gt;
 &amp;#039;______________________________________________________&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;Set RootDSE&lt;br /&gt;
 Set objRootDSE = GetObject(&amp;quot;LDAP://rootDSE&amp;quot;)&lt;br /&gt;
 strDomain = objRootDSE.Get(&amp;quot;defaultNamingContext&amp;quot;)&lt;br /&gt;
 strADPath = &amp;quot;LDAP://&amp;quot; &amp;amp; strDomain&lt;br /&gt;
 &amp;#039;wscript.Echo strADPath&lt;br /&gt;
 Set objDomain = GetObject(strADPath)&lt;br /&gt;
 &amp;#039;wscript.echo &amp;quot;objDomain: &amp;quot; &amp;amp; objDomain.distinguishedName&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;Setup ADODB connection&lt;br /&gt;
 Set objConnection = CreateObject(&amp;quot;ADODB.Connection&amp;quot;)&lt;br /&gt;
 objConnection.Open &amp;quot;Provider=ADsDSOObject;&amp;quot;&lt;br /&gt;
 Set objCommand = CreateObject(&amp;quot;ADODB.Command&amp;quot;)&lt;br /&gt;
 objCommand.ActiveConnection = objConnection&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;Execute search command to look for Contacts &amp;amp; Groups&lt;br /&gt;
     objCommand.CommandText = _&lt;br /&gt;
       &amp;quot;&amp;lt;&amp;quot; &amp;amp; strADPath &amp;amp; &amp;quot;&amp;gt;&amp;quot; &amp;amp; &amp;quot;;(&amp;amp;(|(objectClass=contact)(objectClass=group))(mail=*))&amp;quot; &amp;amp; &amp;quot;;distinguishedName,displayName,mail,proxyAddresses;subtree&amp;quot;&lt;br /&gt;
&lt;br /&gt;
     &amp;#039;Execute search to get Recordset&lt;br /&gt;
     Set objRecordSet = objCommand.Execute&lt;br /&gt;
     &lt;br /&gt;
         &lt;br /&gt;
         &amp;#039;Start procedure&lt;br /&gt;
         &lt;br /&gt;
     strResult = strResult &amp;amp; VbCrLf &amp;amp; &amp;quot;# Domain: &amp;quot; &amp;amp; strDomain&lt;br /&gt;
&lt;br /&gt;
     strResult = strResult &amp;amp; VbCrlf &amp;amp;  &amp;quot;#Total Records Found (other accounts, distribution groups): &amp;quot; &amp;amp; objRecordSet.RecordCount &amp;amp; VbCrlf&lt;br /&gt;
     AddressCount = 0&lt;br /&gt;
&lt;br /&gt;
        While Not objRecordSet.EOF &amp;#039;Iterate through the search results&lt;br /&gt;
  &lt;br /&gt;
             strUserDN = objRecordSet.Fields(&amp;quot;distinguishedName&amp;quot;)     &amp;#039;Get User&amp;#039;s distinguished name from Recordset into a string&lt;br /&gt;
             set objUser= GetObject(&amp;quot;LDAP://&amp;quot;&amp;amp; strUserDN &amp;amp; &amp;quot;&amp;quot;)         &amp;#039;Use string to bind to user object&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
                        arrProxyAddresses = objRecordSet.Fields(&amp;quot;proxyAddresses&amp;quot;)&lt;br /&gt;
                        If IsArray(objRecordSet.Fields(&amp;quot;proxyAddresses&amp;quot;)) Then               &lt;br /&gt;
                           For Each ProxyAddress in arrProxyAddresses&lt;br /&gt;
                             &amp;#039;Sub: Check X400 &lt;br /&gt;
                              If InStr(LCase(ProxyAddress), strX400Search) &amp;lt;&amp;gt; 0 Then &lt;br /&gt;
                         		&amp;#039;Wscript.Echo &amp;quot;#This was an x400&amp;quot;&lt;br /&gt;
                     		 Else&lt;br /&gt;
                                      If InStr(1, ProxyAddress, LocSearch, 1) = 0 Then&lt;br /&gt;
                                          proxyAddress = Right(proxyAddress, Len(proxyAddress) -5 )&lt;br /&gt;
                                          strResult = strResult &amp;amp; VbCrlf &amp;amp; proxyAddress &amp;amp; &amp;quot;   OK&amp;quot;&lt;br /&gt;
                                      End If&lt;br /&gt;
                               End If   &amp;#039;Ends loop for X400 address&lt;br /&gt;
                 Next&lt;br /&gt;
&lt;br /&gt;
             Else&lt;br /&gt;
                 strResult = strResult &amp;amp; VbCrlf &amp;amp;  &amp;quot;#Object does not have proxy addresses&amp;quot;&lt;br /&gt;
             End If&lt;br /&gt;
                 &amp;#039;strResult = strResult &amp;amp;  VbCrLf&lt;br /&gt;
&lt;br /&gt;
      objRecordSet.MoveNext&lt;br /&gt;
 Wend&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;*************************************&lt;br /&gt;
 &amp;#039;Begin second query for users&lt;br /&gt;
 varDisabledCounter = 0                  &lt;br /&gt;
&lt;br /&gt;
 &amp;#039;Execute search command to look for user&lt;br /&gt;
     objCommand.CommandText = _&lt;br /&gt;
       &amp;quot;&amp;lt;&amp;quot; &amp;amp; strADPath &amp;amp; &amp;quot;&amp;gt;&amp;quot; &amp;amp; &amp;quot;;(&amp;amp;(objectClass=user)(mail=*))&amp;quot; &amp;amp; &amp;quot;;distinguishedName,displayName,mail,proxyAddresses;subtree&amp;quot;&lt;br /&gt;
&lt;br /&gt;
     &amp;#039;Execute search to get Recordset&lt;br /&gt;
     Set objRecordSet = objCommand.Execute&lt;br /&gt;
     &lt;br /&gt;
     strResult = strResult &amp;amp; vbCrlf &amp;amp; vbCrlf &amp;amp; &amp;quot;#Users&amp;quot;&lt;br /&gt;
     strResult = strResult &amp;amp; VbCrlf &amp;amp;  &amp;quot;#Total Records Found (users): &amp;quot; &amp;amp; objRecordSet.RecordCount&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        While Not objRecordSet.EOF &amp;#039;Iterate through the search results&lt;br /&gt;
             strUserDN = objRecordSet.Fields(&amp;quot;distinguishedName&amp;quot;)     &amp;#039;Get User&amp;#039;s distinguished name from Recordset into a string&lt;br /&gt;
             set objUser= GetObject(&amp;quot;LDAP://&amp;quot;&amp;amp; strUserDN &amp;amp; &amp;quot;&amp;quot;)         &amp;#039;Use string to bind to user object&lt;br /&gt;
             &lt;br /&gt;
             &lt;br /&gt;
             If objUser.AccountDisabled = TRUE Then                    &amp;#039;If User account disabled, then skip proxy address enum&lt;br /&gt;
                varDisabledCounter = varDisabledCounter + 1&lt;br /&gt;
                strResult2 = strResult2 &amp;amp; VbCrLf &amp;amp; &amp;quot;# &amp;quot; &amp;amp; varDisabledCounter &amp;amp; &amp;quot; &amp;quot; &amp;amp; objUser.displayName &amp;amp; VbCrLf&lt;br /&gt;
&lt;br /&gt;
                        arrProxyAddresses = objRecordSet.Fields(&amp;quot;proxyAddresses&amp;quot;)&lt;br /&gt;
                        If IsArray(objRecordSet.Fields(&amp;quot;proxyAddresses&amp;quot;)) Then&lt;br /&gt;
&lt;br /&gt;
                           For Each ProxyAddress in arrProxyAddresses&lt;br /&gt;
                             &amp;#039;Sub: Check X400&lt;br /&gt;
                              If InStr(LCase(ProxyAddress), strX400Search) &amp;lt;&amp;gt; 0 Then &lt;br /&gt;
                         		&amp;#039;Wscript.Echo &amp;quot;#This was an x400&amp;quot;&lt;br /&gt;
                     		 Else&lt;br /&gt;
                                          If InStr(1, ProxyAddress, LocSearch, 1) = 0 Then&lt;br /&gt;
                                              proxyAddress = Right(proxyAddress, Len(proxyAddress) -5 )&lt;br /&gt;
                         		     strResult2 = strResult2 &amp;amp; &amp;quot;# &amp;quot; &amp;amp;  proxyAddress &amp;amp; &amp;quot;   OK&amp;quot;&lt;br /&gt;
                                          End If&lt;br /&gt;
                                  AddressCount = AddressCount + 1&lt;br /&gt;
                               End If   &amp;#039;Ends loop for X400 address&lt;br /&gt;
                           Next&lt;br /&gt;
                               Else&lt;br /&gt;
                                   strResult2 = strResult2 &amp;amp; VbCrLf &amp;amp;  &amp;quot;#Object does not have proxy addresses&amp;quot;&lt;br /&gt;
                           End If&lt;br /&gt;
                               &amp;#039;strResult2 = strResult2 &amp;amp;  VbCrLf&lt;br /&gt;
                &lt;br /&gt;
    &lt;br /&gt;
             Else&lt;br /&gt;
                   strResult = strResult &amp;amp; VbCrLf &amp;amp; &amp;quot;# &amp;quot; &amp;amp; &amp;quot; &amp;quot; &amp;amp; objUser.displayName&lt;br /&gt;
                        arrProxyAddresses = objRecordSet.Fields(&amp;quot;proxyAddresses&amp;quot;)&lt;br /&gt;
                        If IsArray(objRecordSet.Fields(&amp;quot;proxyAddresses&amp;quot;)) Then&lt;br /&gt;
                           &lt;br /&gt;
                           For Each ProxyAddress in arrProxyAddresses&lt;br /&gt;
                             &amp;#039;Sub: Check X400&lt;br /&gt;
                              If InStr(LCase(ProxyAddress), strX400Search) &amp;lt;&amp;gt; 0 Then &lt;br /&gt;
                         		&amp;#039;Wscript.Echo &amp;quot;#This was an x400&amp;quot;&lt;br /&gt;
                     		 Else&lt;br /&gt;
                                          If InStr(1, ProxyAddress, LocSearch, 1) = 0 Then&lt;br /&gt;
                                              proxyAddress = Right(proxyAddress, Len(proxyAddress) -5 )&lt;br /&gt;
                         		     strResult = strResult &amp;amp; vbCrlf &amp;amp; proxyAddress &amp;amp; &amp;quot;   OK&amp;quot;&lt;br /&gt;
                                          End If&lt;br /&gt;
                                  AddressCount = AddressCount + 1&lt;br /&gt;
                               End If   &amp;#039;Ends loop for X400 address&lt;br /&gt;
                           Next&lt;br /&gt;
                               Else&lt;br /&gt;
                                   strResult = strResult &amp;amp; VbCrLf &amp;amp;  &amp;quot;#Object does not have proxy addresses&amp;quot;&lt;br /&gt;
                           End If&lt;br /&gt;
                               strResult = strResult &amp;amp;  VbCrLf&lt;br /&gt;
                 &lt;br /&gt;
           End If   &amp;#039;End check for disabled user &lt;br /&gt;
             &lt;br /&gt;
      objRecordSet.MoveNext &lt;br /&gt;
 Wend  &amp;#039;End second query for users&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
 strResult = &amp;quot;# Users, Groups &amp;amp; Contacts&amp;quot; &amp;amp; VbCrLf &amp;amp; &amp;quot;#-------------------------&amp;quot; &amp;amp; VbCrLf &amp;amp; strResult&lt;br /&gt;
 strResult = strResult &amp;amp; VbCrLf &amp;amp; &amp;quot;# Disabled Users&amp;quot; &amp;amp; VbCrLf &amp;amp; &amp;quot;#-------------------------&amp;quot; &amp;amp; VbCrLf &amp;amp; strResult2&lt;br /&gt;
 &amp;#039;WScript.Echo strResult&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;Output to a text file&lt;br /&gt;
 Set objFileSystem = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
 Set objOutputFile = objFileSystem.CreateTextFile(&amp;quot;C:\Inetpub\wwwroot\virtual.txt&amp;quot;)&lt;br /&gt;
 objOutputFile.Write strResult&lt;/div&gt;</summary>
		<author><name>Clandmeter</name></author>
	</entry>
</feed>