|
|
|
date: Wed, 7 Jun 2006 13:36:02 -0700,
group: microsoft.public.exchange2000.development
back
Re: out of the office
You can use any of the Exchange API to read the out of office state there
are a few ways to do this the first is just to query the freebusy
information for that user if they have there out of office set it should
return oof so something like
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_esdk_checking_free_busy_status_http.asp?frame=true
or
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_esdk_checking_free_busy_status_http.asp?frame=true
The other method to use is to query the oofstate property directly in the
users mailbox if your using Exoledb and Webdav you need to query the
http://schemas.microsoft.com/exchange/oof-state property in the
NON_IPM_Subtree root of the mailbox. eg some webdav to do this would look
like
set xmlobjreq = createobject("Microsoft.XMLHTTP")
xmlstr = "<?xml version='1.0' encoding='UTF-8' ?>" _
& "<a:propfind xmlns:a='DAV:'
xmlns:b='urn:schemas-microsoft-com:datatypes'>" _
& "<a:prop xmlns:d='http://schemas.microsoft.com/exchange/'>" _
& "<d:oof-state/>" _
& "</a:prop>" _
& "</a:propfind>"
xmlobjreq.open "PROPFIND", "http://server/exchange/mailbox/NON_IPM_SUBTREE",
false, "", ""
xmlobjreq.setRequestHeader "Content-Type", "text/xml; charset=""UTF-8"""
xmlobjreq.setRequestHeader "Depth", "0"
xmlobjreq.setRequestHeader "Translate", "f"
xmlobjreq.send xmlstr
set oResponseDoc = xmlobjreq.responseXML
set osubNodeList = oResponseDoc.getElementsByTagName("d:oof-state/")
ntar = osubNodeList.length -1
wscript.Echo osubNodeList.Item(ntar).text
If you want to use MAPI you can query this via CDO 1.2 its even eaiser
something like
set objSession = CreateObject("MAPI.Session")
strProfile = "YourServer" & vbLf & "YourAlias"
objSession.Logon "Profile Name",,, False,, True, strProfile
wscript.echo objSession.outofoffice
The mapi property itself is PR_OOF_STATE (0x661D000B)
Forwarding can be done in a few places eg in the delivery option in ADUC and
by the user setting up rules. There are no real easy ways that i know of to
document user forwarding rules you can try using the Rule.dll to do
something like
http://blogs.msdn.com/adioltean/archive/2004/11/18/259448.aspx.
I hacked around with a rule decode a while ago which i found worked for me
which i posted up on
http://gsexdev.blogspot.com/2005/10/reporting-on-forwarding-rules-in.html
cheers
Glen
"Norbert Fischer" <Norbert Fischer@discussions.microsoft.com> wrote in
message news:DD5C4A15-5AB0-4324-8DA8-2A3650D9DBC5@microsoft.com...
> Hi,
>
> we are looking for a serverside code (Exchange 2000/2003) to read if a
> user
> has set the out of the office flag and if possible which rules for
> forwarding
> are set.
> Any ideas?
>
> NF
>
>
date: Thu, 8 Jun 2006 09:46:47 +1000
author: Glen Scales [MVP]
Re: out of the office
Hi Glen,
thanks for your responce, I read your article on blugsport.com and found
most things i need, but one thing i missing is to find out, if the forward
role is active or not, so if you know where i can find this in the message
object, i would be very happy.
with greate thanks and kind regards,
NF
"Glen Scales [MVP]" wrote:
> You can use any of the Exchange API to read the out of office state there
> are a few ways to do this the first is just to query the freebusy
> information for that user if they have there out of office set it should
> return oof so something like
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_esdk_checking_free_busy_status_http.asp?frame=true
>
> or
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_esdk_checking_free_busy_status_http.asp?frame=true
>
> The other method to use is to query the oofstate property directly in the
> users mailbox if your using Exoledb and Webdav you need to query the
> http://schemas.microsoft.com/exchange/oof-state property in the
> NON_IPM_Subtree root of the mailbox. eg some webdav to do this would look
> like
>
>
> set xmlobjreq = createobject("Microsoft.XMLHTTP")
> xmlstr = "<?xml version='1.0' encoding='UTF-8' ?>" _
> & "<a:propfind xmlns:a='DAV:'
> xmlns:b='urn:schemas-microsoft-com:datatypes'>" _
> & "<a:prop xmlns:d='http://schemas.microsoft.com/exchange/'>" _
> & "<d:oof-state/>" _
> & "</a:prop>" _
> & "</a:propfind>"
> xmlobjreq.open "PROPFIND", "http://server/exchange/mailbox/NON_IPM_SUBTREE",
> false, "", ""
> xmlobjreq.setRequestHeader "Content-Type", "text/xml; charset=""UTF-8"""
> xmlobjreq.setRequestHeader "Depth", "0"
> xmlobjreq.setRequestHeader "Translate", "f"
> xmlobjreq.send xmlstr
> set oResponseDoc = xmlobjreq.responseXML
> set osubNodeList = oResponseDoc.getElementsByTagName("d:oof-state/")
> ntar = osubNodeList.length -1
> wscript.Echo osubNodeList.Item(ntar).text
>
>
> If you want to use MAPI you can query this via CDO 1.2 its even eaiser
> something like
>
> set objSession = CreateObject("MAPI.Session")
> strProfile = "YourServer" & vbLf & "YourAlias"
> objSession.Logon "Profile Name",,, False,, True, strProfile
> wscript.echo objSession.outofoffice
>
> The mapi property itself is PR_OOF_STATE (0x661D000B)
>
> Forwarding can be done in a few places eg in the delivery option in ADUC and
> by the user setting up rules. There are no real easy ways that i know of to
> document user forwarding rules you can try using the Rule.dll to do
> something like
> http://blogs.msdn.com/adioltean/archive/2004/11/18/259448.aspx.
>
> I hacked around with a rule decode a while ago which i found worked for me
> which i posted up on
> http://gsexdev.blogspot.com/2005/10/reporting-on-forwarding-rules-in.html
>
> cheers
> Glen
>
>
> "Norbert Fischer" <Norbert Fischer@discussions.microsoft.com> wrote in
> message news:DD5C4A15-5AB0-4324-8DA8-2A3650D9DBC5@microsoft.com...
> > Hi,
> >
> > we are looking for a serverside code (Exchange 2000/2003) to read if a
> > user
> > has set the out of the office flag and if possible which rules for
> > forwarding
> > are set.
> > Any ideas?
> >
> > NF
> >
> >
>
>
>
date: Tue, 13 Jun 2006 01:01:01 -0700
author: Norbert Fischer
Re: out of the office
Are you talking about Outlook rules or the Active Directory Forwarding ?
Generally if an Outlook rule is disabled you shouldn't be able to query it
With the AD forwarding the forwarding address is held in the altRecipient AD
property there's a good sample here
http://www.microsoft.com/technet/scriptcenter/resources/qanda/mar06/hey0322.mspx
for showing this for all user in a domain.
Cheers
Glen
"Norbert Fischer" wrote in
message news:6B7FCCFA-9DE6-455C-BF6E-C2405F1B1549@microsoft.com...
> Hi Glen,
>
> thanks for your responce, I read your article on blugsport.com and found
> most things i need, but one thing i missing is to find out, if the forward
> role is active or not, so if you know where i can find this in the message
> object, i would be very happy.
>
>
> with greate thanks and kind regards,
> NF
>
> "Glen Scales [MVP]" wrote:
>
>> You can use any of the Exchange API to read the out of office state there
>> are a few ways to do this the first is just to query the freebusy
>> information for that user if they have there out of office set it should
>> return oof so something like
>>
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_esdk_checking_free_busy_status_http.asp?frame=true
>>
>> or
>>
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_esdk_checking_free_busy_status_http.asp?frame=true
>>
>> The other method to use is to query the oofstate property directly in the
>> users mailbox if your using Exoledb and Webdav you need to query the
>> http://schemas.microsoft.com/exchange/oof-state property in the
>> NON_IPM_Subtree root of the mailbox. eg some webdav to do this would look
>> like
>>
>>
>> set xmlobjreq = createobject("Microsoft.XMLHTTP")
>> xmlstr = "<?xml version='1.0' encoding='UTF-8' ?>" _
>> & "<a:propfind xmlns:a='DAV:'
>> xmlns:b='urn:schemas-microsoft-com:datatypes'>" _
>> & "<a:prop xmlns:d='http://schemas.microsoft.com/exchange/'>" _
>> & "<d:oof-state/>" _
>> & "</a:prop>" _
>> & "</a:propfind>"
>> xmlobjreq.open "PROPFIND",
>> "http://server/exchange/mailbox/NON_IPM_SUBTREE",
>> false, "", ""
>> xmlobjreq.setRequestHeader "Content-Type", "text/xml; charset=""UTF-8"""
>> xmlobjreq.setRequestHeader "Depth", "0"
>> xmlobjreq.setRequestHeader "Translate", "f"
>> xmlobjreq.send xmlstr
>> set oResponseDoc = xmlobjreq.responseXML
>> set osubNodeList = oResponseDoc.getElementsByTagName("d:oof-state/")
>> ntar = osubNodeList.length -1
>> wscript.Echo osubNodeList.Item(ntar).text
>>
>>
>> If you want to use MAPI you can query this via CDO 1.2 its even eaiser
>> something like
>>
>> set objSession = CreateObject("MAPI.Session")
>> strProfile = "YourServer" & vbLf & "YourAlias"
>> objSession.Logon "Profile Name",,, False,, True, strProfile
>> wscript.echo objSession.outofoffice
>>
>> The mapi property itself is PR_OOF_STATE (0x661D000B)
>>
>> Forwarding can be done in a few places eg in the delivery option in ADUC
>> and
>> by the user setting up rules. There are no real easy ways that i know of
>> to
>> document user forwarding rules you can try using the Rule.dll to do
>> something like
>> http://blogs.msdn.com/adioltean/archive/2004/11/18/259448.aspx.
>>
>> I hacked around with a rule decode a while ago which i found worked for
>> me
>> which i posted up on
>> http://gsexdev.blogspot.com/2005/10/reporting-on-forwarding-rules-in.html
>>
>> cheers
>> Glen
>>
>>
>> "Norbert Fischer" <Norbert Fischer@discussions.microsoft.com> wrote in
>> message news:DD5C4A15-5AB0-4324-8DA8-2A3650D9DBC5@microsoft.com...
>> > Hi,
>> >
>> > we are looking for a serverside code (Exchange 2000/2003) to read if a
>> > user
>> > has set the out of the office flag and if possible which rules for
>> > forwarding
>> > are set.
>> > Any ideas?
>> >
>> > NF
>> >
>> >
>>
>>
>>
date: Wed, 14 Jun 2006 15:47:09 +1000
author: Glen Scales [MVP]
|
|