Discussion:
track targetAddress attribute
(too old to reply)
Liz Real
2007-11-30 16:51:03 UTC
Permalink
Hello,
I work for a private university in California and I am trying to find out if
it is possible to track how many of our students are forwarding email
off-campus. I read that the targetaddress attribute can be used to accomplish
this task.

I appreciate any help on this.
Richard Mueller [MVP]
2007-11-30 17:11:24 UTC
Permalink
Post by Liz Real
I work for a private university in California and I am trying to find out if
it is possible to track how many of our students are forwarding email
off-campus. I read that the targetaddress attribute can be used to accomplish
this task.
I appreciate any help on this.
I don't have Exchange so I cannot test, but it appears the value of this
attribute is used to redirect email when the intended recipient is
unavailable. You should be able to use ADO in a VBScript program to retrieve
information on all users that have a value assigned to this attribute. See
this link for details:

http://www.rlmueller.net/ADOSearchTips.htm

Using the syntax from this link, the search filter would be:

strFilter = "(&(objectCategory=person)(objectClass=user)(targetAddress=*))"

You could retrieve user names (sAMAccountName or distinguishedName), or just
count the number of users that have a value assigned to targetAddress. You
could also retrieve the value of targetAddress.

Note that the same filter,
(&(objectCategory=person)(objectClass=user)(targetAddress=*)), can be used
with command line tools like dsquery and Joe Richards' adfind. For more on
adfind see this link:

http://joeware.net/freetools/tools/adfind/index.htm
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Liz Real
2007-11-30 18:41:06 UTC
Permalink
Thank you Richard for the suggestion. To be honest I do not have much
experience with VBscript.
I downloaded the command line tool adFind from
http://joeware.net/freetools/tools/adfind/index.htm, ran it but it
opens/closes so fast i can't even read what it says.

any suggestions? i greatly appreciate it.
Post by Richard Mueller [MVP]
Post by Liz Real
I work for a private university in California and I am trying to find out if
it is possible to track how many of our students are forwarding email
off-campus. I read that the targetaddress attribute can be used to accomplish
this task.
I appreciate any help on this.
I don't have Exchange so I cannot test, but it appears the value of this
attribute is used to redirect email when the intended recipient is
unavailable. You should be able to use ADO in a VBScript program to retrieve
information on all users that have a value assigned to this attribute. See
http://www.rlmueller.net/ADOSearchTips.htm
strFilter = "(&(objectCategory=person)(objectClass=user)(targetAddress=*))"
You could retrieve user names (sAMAccountName or distinguishedName), or just
count the number of users that have a value assigned to targetAddress. You
could also retrieve the value of targetAddress.
Note that the same filter,
(&(objectCategory=person)(objectClass=user)(targetAddress=*)), can be used
with command line tools like dsquery and Joe Richards' adfind. For more on
http://joeware.net/freetools/tools/adfind/index.htm
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Brian Desmond [MVP]
2007-11-30 19:52:42 UTC
Permalink
If you run adfind from a command prompt you won't have issues with it
opening/closing :)
--
Thanks,
Brian Desmond
Windows Server MVP - Directory Services

www.briandesmond.com
Post by Liz Real
Thank you Richard for the suggestion. To be honest I do not have much
experience with VBscript.
I downloaded the command line tool adFind from
http://joeware.net/freetools/tools/adfind/index.htm, ran it but it
opens/closes so fast i can't even read what it says.
any suggestions? i greatly appreciate it.
Post by Richard Mueller [MVP]
Post by Liz Real
I work for a private university in California and I am trying to find
out
if
it is possible to track how many of our students are forwarding email
off-campus. I read that the targetaddress attribute can be used to accomplish
this task.
I appreciate any help on this.
I don't have Exchange so I cannot test, but it appears the value of this
attribute is used to redirect email when the intended recipient is
unavailable. You should be able to use ADO in a VBScript program to retrieve
information on all users that have a value assigned to this attribute. See
http://www.rlmueller.net/ADOSearchTips.htm
strFilter =
"(&(objectCategory=person)(objectClass=user)(targetAddress=*))"
You could retrieve user names (sAMAccountName or distinguishedName), or just
count the number of users that have a value assigned to targetAddress. You
could also retrieve the value of targetAddress.
Note that the same filter,
(&(objectCategory=person)(objectClass=user)(targetAddress=*)), can be used
with command line tools like dsquery and Joe Richards' adfind. For more on
http://joeware.net/freetools/tools/adfind/index.htm
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Liz Real
2007-11-30 23:15:01 UTC
Permalink
I was able to open the tool in the command prompt, thanks for the help. Now
to the next step, how do I run this filter?
(&(objectCategory=person)(objectClass=user)(targetAddress=*))
in order to find out how many students have a forward set to off campus
addresses?
Post by Brian Desmond [MVP]
If you run adfind from a command prompt you won't have issues with it
opening/closing :)
--
Thanks,
Brian Desmond
Windows Server MVP - Directory Services
www.briandesmond.com
Post by Liz Real
Thank you Richard for the suggestion. To be honest I do not have much
experience with VBscript.
I downloaded the command line tool adFind from
http://joeware.net/freetools/tools/adfind/index.htm, ran it but it
opens/closes so fast i can't even read what it says.
any suggestions? i greatly appreciate it.
Post by Richard Mueller [MVP]
Post by Liz Real
I work for a private university in California and I am trying to find
out
if
it is possible to track how many of our students are forwarding email
off-campus. I read that the targetaddress attribute can be used to accomplish
this task.
I appreciate any help on this.
I don't have Exchange so I cannot test, but it appears the value of this
attribute is used to redirect email when the intended recipient is
unavailable. You should be able to use ADO in a VBScript program to retrieve
information on all users that have a value assigned to this attribute. See
http://www.rlmueller.net/ADOSearchTips.htm
strFilter =
"(&(objectCategory=person)(objectClass=user)(targetAddress=*))"
You could retrieve user names (sAMAccountName or distinguishedName), or just
count the number of users that have a value assigned to targetAddress. You
could also retrieve the value of targetAddress.
Note that the same filter,
(&(objectCategory=person)(objectClass=user)(targetAddress=*)), can be used
with command line tools like dsquery and Joe Richards' adfind. For more on
http://joeware.net/freetools/tools/adfind/index.htm
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Richard Mueller [MVP]
2007-12-01 19:44:41 UTC
Permalink
To get a count of the number of users that have any value assigned to
targetAddress (one line):

adfind -b dc=MyDomain,dc=com -f
"(&(objectCategory=person)(objectClass=user)(targetAddress=*))" -c

To output the users' NT names and the value of targetAddres:

adfind -b dc=MyDomain,dc=com -f
"(&(objectCategory=person)(objectClass=user)(targetAddress=*))"
sAMAccountName targetAddress

You can get syntax help by entering (at a command prompt):

adfind /?

The -b switch sets the base of the search, -f the filter.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Post by Liz Real
I was able to open the tool in the command prompt, thanks for the help. Now
to the next step, how do I run this filter?
(&(objectCategory=person)(objectClass=user)(targetAddress=*))
in order to find out how many students have a forward set to off campus
addresses?
Post by Brian Desmond [MVP]
If you run adfind from a command prompt you won't have issues with it
opening/closing :)
--
Thanks,
Brian Desmond
Windows Server MVP - Directory Services
www.briandesmond.com
Post by Liz Real
Thank you Richard for the suggestion. To be honest I do not have much
experience with VBscript.
I downloaded the command line tool adFind from
http://joeware.net/freetools/tools/adfind/index.htm, ran it but it
opens/closes so fast i can't even read what it says.
any suggestions? i greatly appreciate it.
Post by Richard Mueller [MVP]
Post by Liz Real
I work for a private university in California and I am trying to find
out
if
it is possible to track how many of our students are forwarding email
off-campus. I read that the targetaddress attribute can be used to accomplish
this task.
I appreciate any help on this.
I don't have Exchange so I cannot test, but it appears the value of this
attribute is used to redirect email when the intended recipient is
unavailable. You should be able to use ADO in a VBScript program to retrieve
information on all users that have a value assigned to this attribute. See
http://www.rlmueller.net/ADOSearchTips.htm
strFilter =
"(&(objectCategory=person)(objectClass=user)(targetAddress=*))"
You could retrieve user names (sAMAccountName or distinguishedName),
or
just
count the number of users that have a value assigned to targetAddress. You
could also retrieve the value of targetAddress.
Note that the same filter,
(&(objectCategory=person)(objectClass=user)(targetAddress=*)), can be used
with command line tools like dsquery and Joe Richards' adfind. For
more
on
http://joeware.net/freetools/tools/adfind/index.htm
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Liz Real
2007-12-05 00:05:00 UTC
Permalink
Thank you Richard. I was able to complete this task.

I appreciate all the advise given.
Post by Richard Mueller [MVP]
To get a count of the number of users that have any value assigned to
adfind -b dc=MyDomain,dc=com -f
"(&(objectCategory=person)(objectClass=user)(targetAddress=*))" -c
adfind -b dc=MyDomain,dc=com -f
"(&(objectCategory=person)(objectClass=user)(targetAddress=*))"
sAMAccountName targetAddress
adfind /?
The -b switch sets the base of the search, -f the filter.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Post by Liz Real
I was able to open the tool in the command prompt, thanks for the help. Now
to the next step, how do I run this filter?
(&(objectCategory=person)(objectClass=user)(targetAddress=*))
in order to find out how many students have a forward set to off campus
addresses?
Post by Brian Desmond [MVP]
If you run adfind from a command prompt you won't have issues with it
opening/closing :)
--
Thanks,
Brian Desmond
Windows Server MVP - Directory Services
www.briandesmond.com
Post by Liz Real
Thank you Richard for the suggestion. To be honest I do not have much
experience with VBscript.
I downloaded the command line tool adFind from
http://joeware.net/freetools/tools/adfind/index.htm, ran it but it
opens/closes so fast i can't even read what it says.
any suggestions? i greatly appreciate it.
Post by Richard Mueller [MVP]
Post by Liz Real
I work for a private university in California and I am trying to find
out
if
it is possible to track how many of our students are forwarding email
off-campus. I read that the targetaddress attribute can be used to
accomplish
this task.
I appreciate any help on this.
I don't have Exchange so I cannot test, but it appears the value of this
attribute is used to redirect email when the intended recipient is
unavailable. You should be able to use ADO in a VBScript program to retrieve
information on all users that have a value assigned to this attribute. See
http://www.rlmueller.net/ADOSearchTips.htm
strFilter =
"(&(objectCategory=person)(objectClass=user)(targetAddress=*))"
You could retrieve user names (sAMAccountName or distinguishedName),
or
just
count the number of users that have a value assigned to targetAddress. You
could also retrieve the value of targetAddress.
Note that the same filter,
(&(objectCategory=person)(objectClass=user)(targetAddress=*)), can be used
with command line tools like dsquery and Joe Richards' adfind. For
more
on
http://joeware.net/freetools/tools/adfind/index.htm
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Joe D
2007-11-30 20:38:22 UTC
Permalink
yes, this attribute redirects email but a normal user wouldnt be allowed to
change this attribute. also, this attribute is different than setting a
forwarding address in ADUC.
Post by Liz Real
Hello,
I work for a private university in California and I am trying to find out if
it is possible to track how many of our students are forwarding email
off-campus. I read that the targetaddress attribute can be used to accomplish
this task.
I appreciate any help on this.
Loading...