Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Exchange 2008 - Welcome email

Posted on 2011-10-04
5
Medium Priority
?
226 Views
Last Modified: 2014-02-07
I have seen many of these, but non related to Exchange 2008.  I have been told that in 2008 this functionality is not available and it has to be scripted.  What I am looking for is an email to be autogenerated for every new account that is set in AD.  We will put the appropriate welcome content in this email.  Does anyone know if we can do this natively or where a powershell script or other could be found?
0
Comment
Question by:jeffnorem
3 Comments
 
LVL 23

Accepted Solution

by:
Malli Boppe earned 252 total points
ID: 36915031
I Hvae used this script in the past

Dim objConnection, objCommand, objRecordSet, objRootDSE, objMessage


Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"

Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection

Set objRootDSE = GetObject("LDAP://RootDSE")
objCommand.CommandText = _
 "Select name,mail,whencreated  from 'LDAP://ou=staff,ou=Accounts,dc=domain,dc=com'"
Set objRootDSE = Nothing

objCommand.Properties("Page Size") = 10000
objCommand.Properties("Timeout") = 600
objCommand.Properties("Cache Results") = False

Set objRecordSet = objCommand.Execute

While Not objRecordSet.EOF

   
If StrComp(Left(objRecordSet.Fields("whencreated"), 10), Date-2) = 0 Then
Set objMessage = CreateObject("CDO.Message")
objMessage.from = "Helpdesk-IT@domain.com"
objMessage.To = objRecordSet.Fields("mail")
objMessage.subject = "Welcome to Comapny"
objMessage.TextBody = BodyText
objMessage.CreateMHTMLBody "file://G:\Welcome.htm"

objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2  
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "Ip Address of exchange server"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport ") = 25
objMessage.Configuration.Fields.Update
   
objMessage.Send


End If

objRecordSet.MoveNext
Wend

objConnection.Close
Set objRecordSet = Nothing
Set objCommand = Nothing
Set objConnection = Nothing
0
 
LVL 26

Assisted Solution

by:e_aravind
e_aravind earned 248 total points
ID: 36923458
Just a clarification is that Exchange 2008?

Reference: http://en.wikipedia.org/wiki/Microsoft_Exchange_Server
0
 

Author Comment

by:jeffnorem
ID: 36924622
Sorry, Fat fingered... 2007
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes Top 9 Exchange troubleshooting utilities that every Exchange Administrator should know. Most of the utilities are available free of cost. List of tools that I am going to explain in this article are:   Microsoft Remote Con…
Exchange database can often fail to mount thereby halting the work of all users connected to it. Finding out why database isn’t mounting is crucial and getting the server back online. Stellar Phoenix Mailbox Exchange Recovery is a champion product t…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question