Problem solve Get help with specific problems with your technologies, process and projects.

Can an admin create out-of-office messages from ESM or AD?

Find out whether an Exchange Server administrator has the capability to create out-of-office messages for users from Exchange System Manager (ESM) or Active Directory in this expert advice.

Is there a way to create out-of-office messages for an Exchange Server user from Exchange System Manager (ESM) or Active Directory? I'd like to avoid the hassle of having to log in to that person's computer and Exchange Server mailbox just to say they are out for the day (sick, vacation, etc.). There are times when users forget to set out-of-office messages themselves (e.g., vacation) and other times when it is a last-minute situation (e.g., sick).

No, this is not possible. Exchange Server 2007 adds the capability for an administrator to control out-of-office (OOF) settings at a domain-wide or per-user level via the Set-Mailbox cmdlet –externalOOFOptions switch. However, administrators can't centrally manage the actual text in those OOF settings.


Your answer is correct for the ESM or Active Directory. However, as an administrator, you can start Microsoft Outlook with another user's profile or log into their account through Outlook Web Access (OWA) using the system administrator password. From there, you can create an out-of-office message for their account.
—Stephen R.


The following VBScript will allow you to modify out-of-office messages through a MAPI session from any computer in the domain that has ESM installed on it:

On Error Resume Next

Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject")
Set oFile = FileSystem.CreateTextFile("c:\GroupMemebrs.csv", True)

strDC = "cwccorpdc.carlwarren.com" 'Substitute your AD domain server name
strRoot = "carlwarren.Com" 'Substitute your company/domain name
strDomain = "DC=carlwarren,DC=COM"

Set DomainObj = GetObject("LDAP://" & strDC&"/CN=Users," & strDomain)

if Err.Number <0 Then
WScript.echo "Failed to connect to " & strADName
end If
DomainObj.Filter = Array("group")

For Each GroupObj In DomainObj

If GroupObj.Class = "group" Then

oFile.WriteLine ("Group Membership for: " & MID(GroupObj.Name & "," & _
"Description - " & GroupObj.Description,4))
WScript.echo ("Group Membership for: " & MID(GroupObj.Name & vbTab & "| SamAccName:" & GroupObj.SAMAccountName & vbTab &_
CRLF & CRLF & "Description - " & GroupObj.Description,4))
WScript.Echo "Email:"& GroupObj.mail
Wscript.echo " "
WScript.Echo "Members:"

Set memberlist=GroupObj.Members

For Each member In memberlist
oFile.Write MID(member.Name & "," & member.SAMAccountName & "," & member.Class,4)
wscript.echo MID(Vbtab & member.Name & " (" & member.Class & ")",5)
'WScript.Echo member.mail
WScript.Echo "-------------------"
WScript.Echo " "
End If


set DomainObj = Nothing
set GroupObj = Nothing

if err.number<>0 Then

wscript.echo CRLF
wscript.echo ("ERROR: "&err.number&" "&err.description & " from "&err.source)
WScript.echo CRLF

End If

Wscript.Echo "Done!!"

Here's the link to this VBScript to modify out-of-office messages.
—Frank L.


Due to website width constraints, the spacing of the code string submitted by member Frank L. may not appear accurate. Click here for the accurate VBScript code to modify out-of-office messages.
—Steve Cimino, Assistant Editor, SearchExchange.com

Do you have comments on this Ask the Expert Q&A? Let us know.

Related information from SearchExchange.com:

  • Tip: Configure Exchange to automatically send out-of-office replies
  • Tip: How to limit a user's out-of-office messages
  • Tip: Exchange 2007's OOF enhancements
  • Tip: Selectively suppress out-of-office replies with SelectiveOOF
  • Reference Center: Microsoft Exchange Server user settings
  • Dig Deeper on Exchange Server setup and troubleshooting

    Start the conversation

    Send me notifications when other members comment.

    Please create a username to comment.