• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 290
  • Last Modified:

Catch-All Email Account In Exchange2003 ?

Hi All I need to create an catch-all email account for our company on Exchange2003 can anyone please guide me into the right direction ?
0
http:// thevpn.guru
Asked:
http:// thevpn.guru
1 Solution
 
bluetabCommented:
0
 
ZanemwestCommented:
there are many ways to do it

i am partial to VBscript

this script should do the trick


'###############   Start Script
Dim strFilter, strQuery
Dim rootDSE, domainObject
Dim strname,strlog,stremail,struid

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOOBject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection

Set rootDSE=GetObject("LDAP://RootDSE")
domainContainer = rootDSE.Get("defaultNamingContext")
Set domainObject = GetObject("LDAP://" & domainContainer)


Set objCommand.ActiveConnection = objConnection

'######## Enter the path to the text file here ################

strFilePath = "c:\Email addresses.txt"

Set objFSO = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
Set objFile = objFSO.OpenTextFile(strFilePath, 8, True, 0)
If Err.Number <> 0 Then
  On Error GoTo 0
  Set objFSO = Nothing
  Wscript.Quit
End If
On Error GoTo 0



strFilter = "(&(objectcategory=user))"


'###### put your domain information below#################

strQuery = "<LDAP://DC=Domain,DC=COM>;" & strFilter _
  & ";displayname,mail,samaccountname;subtree"
objCommand.CommandText = strQuery
objCommand.Properties("Page Size") = 100
objCommand.Properties("Timeout") = 30
objCommand.Properties("Cache Results") = False
Set objRecordSet = objCommand.Execute

Do Until objRecordSet.EOF
    strname = objRecordSet.Fields("displayname")
    stremail = objRecordSet.Fields("mail")
    struid = objRecordSet.Fields("samaccountname")

    strlog =  strname &": "& struid &": "& stremail
    objfile.WriteLine strlog
   
    objRecordSet.MoveNext
Loop


'####### end script #######
0

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now