Re: [ActiveDir] ds* or joeware to get DN from email address

2006-02-13 Thread Teo De Las Heras
Thanks everyone.  This did the trick.  I'm now able to hand to another admin two sets of *.cmd files which read SMTP addresses from a text file and update group membership.  If any troubleshooting needs to be done after a failed update he's empowered to look on the internet and research.  Awesome!

 
 
Teo 
On 2/11/06, Michael B. Smith <[EMAIL PROTECTED]> wrote:

for /?
 
An excerpt thereof:
 
FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do @echo %i %j %k
 
    would parse each line in myfile.txt, ignoring lines that begin with    a semicolon, passing the 2nd and 3rd token from each line to the for
    body, with tokens delimited by commas and/or spaces.  Notice the for    body statements reference %i to get the 2nd token, %j to get the    3rd token, and %k to get all remaining tokens after the 3rd.  For
    file names that contain spaces, you need to quote the filenames with    double quotes.  In order to use double quotes in this manner, you also    need to use the usebackq option, otherwise the double quotes will be



From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]] On Behalf Of Teo De Las HerasSent:
 Saturday, February 11, 2006 12:05 PMTo: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] ds* or joeware to get DN from email address 


Joe and Hunter, thanks for the reply.  Is it possible to feed the query the SMTP address from a file?  Something similar to:
c:\>type smtp_addresses.txt | adfind -gc -b -f "&(objectCategory=person)(proxyaddresses=)" -dn
 
Thanks!
 
Teo 
On 2/10/06, joe <[EMAIL PROTECTED]> wrote:
 

If you want to match on any smtp address (primary or any secondaries)
 

adfind -gc -b -f "&(objectCategory=person)(
 proxyaddresses=smtp:[EMAIL PROTECTED]
)" -dn
 
That will hit every domain in the forest too. 
 
 

--
O'Reilly Active Directory Third Edition - 
http://www.joeware.net/win/ad3e.htm 
 
 


From: [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED]] On Behalf Of Coleman, HunterSent: Friday, February 10, 2006 5:23 PMTo: 
ActiveDir@mail.activedir.orgSubject: RE: [ActiveDir] ds* or joeware to get DN from email address 


adfind -default -f "&(objectCategory=person)(mail=
 [EMAIL PROTECTED])" dn
 
You can change your search base as necessary. This also assumes that you want to check the primary SMTP address, and not match on a secondary address. 



From: [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED]] On Behalf Of Teo De Las HerasSent: Friday, February 10, 2006 2:50 PMTo: 
ActiveDir@mail.activedir.orgSubject: [ActiveDir] ds* or joeware to get DN from email address 

Are there any tools out there that can get me the DN from an email address?
 
I can write a script for this pretty easily, but I want to hand the task off to another admin that does not know scripting.  Having him use pre-existing tools will simplify things.
 
Teo


RE: [ActiveDir] ds* or joeware to get DN from email address

2006-02-11 Thread Michael B. Smith



for /?
 
An excerpt thereof:
 
FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do 
@echo %i %j %k
 
    would parse each line in myfile.txt, 
ignoring lines that begin with    a semicolon, passing the 
2nd and 3rd token from each line to the for    body, with 
tokens delimited by commas and/or spaces.  Notice the 
for    body statements reference %i to get the 2nd token, %j 
to get the    3rd token, and %k to get all remaining tokens 
after the 3rd.  For    file names that contain spaces, 
you need to quote the filenames with    double quotes.  
In order to use double quotes in this manner, you also    
need to use the usebackq option, otherwise the double quotes will 
be


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Teo De Las 
HerasSent: Saturday, February 11, 2006 12:05 PMTo: 
ActiveDir@mail.activedir.orgSubject: Re: [ActiveDir] ds* or joeware 
to get DN from email address

Joe and Hunter, thanks for the reply.  Is it possible to feed the 
query the SMTP address from a file?  Something similar to:
c:\>type smtp_addresses.txt | adfind -gc -b -f 
"&(objectCategory=person)(proxyaddresses=)" -dn
 
Thanks!
 
Teo 
On 2/10/06, joe 
<[EMAIL PROTECTED]> 
wrote: 

  If you 
  want to match on any smtp address (primary or any 
  secondaries)
   
  
  adfind -gc -b -f 
  "&(objectCategory=person)( 
  proxyaddresses=smtp:[EMAIL PROTECTED])" -dn
   
  That will hit every domain in the forest too. 
  
   
   
  
  --
  O'Reilly 
  Active Directory Third Edition - http://www.joeware.net/win/ad3e.htm 
   
   
  
  
  From: [EMAIL PROTECTED] [mailto: 
  [EMAIL PROTECTED]] On Behalf Of Coleman, 
  HunterSent: Friday, February 10, 2006 5:23 PMTo: ActiveDir@mail.activedir.orgSubject: RE: 
  [ActiveDir] ds* or joeware to get DN from email 
  address 
  
  
  adfind 
  -default -f "&(objectCategory=person)(mail= [EMAIL PROTECTED])" 
  dn
   
  You can 
  change your search base as necessary. This also assumes that you want to check 
  the primary SMTP address, and not match on a secondary address. 
  
  
  
  From: [EMAIL PROTECTED] [mailto: 
  [EMAIL PROTECTED]] On Behalf Of Teo De Las 
  HerasSent: Friday, February 10, 2006 2:50 PMTo: ActiveDir@mail.activedir.orgSubject: [ActiveDir] 
  ds* or joeware to get DN from email address 
  
  Are there any tools out there that can get me the DN from an email 
  address?
   
  I can write a script for this pretty easily, but I want to hand the 
  task off to another admin that does not know scripting.  Having him use 
  pre-existing tools will simplify things.
   
  Teo


Re: [ActiveDir] ds* or joeware to get DN from email address

2006-02-11 Thread Teo De Las Heras
Joe and Hunter, thanks for the reply.  Is it possible to feed the query the SMTP address from a file?  Something similar to:
c:\>type smtp_addresses.txt | adfind -gc -b -f "&(objectCategory=person)(proxyaddresses=)" -dn
 
Thanks!
 
Teo 
On 2/10/06, joe <[EMAIL PROTECTED]> wrote:

If you want to match on any smtp address (primary or any secondaries)
 

adfind -gc -b -f "&(objectCategory=person)(
proxyaddresses=smtp:[EMAIL PROTECTED])" -dn
 
That will hit every domain in the forest too. 
 
 

--
O'Reilly Active Directory Third Edition - 
http://www.joeware.net/win/ad3e.htm 
 
 


From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]] On Behalf Of Coleman, HunterSent: Friday, February 10, 2006 5:23 PMTo: 
ActiveDir@mail.activedir.orgSubject: RE: [ActiveDir] ds* or joeware to get DN from email address 


adfind -default -f "&(objectCategory=person)(mail=
[EMAIL PROTECTED])" dn
 
You can change your search base as necessary. This also assumes that you want to check the primary SMTP address, and not match on a secondary address.



From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]] On Behalf Of Teo De Las HerasSent: Friday, February 10, 2006 2:50 PMTo: 
ActiveDir@mail.activedir.orgSubject: [ActiveDir] ds* or joeware to get DN from email address 

Are there any tools out there that can get me the DN from an email address?
 
I can write a script for this pretty easily, but I want to hand the task off to another admin that does not know scripting.  Having him use pre-existing tools will simplify things.
 
Teo


RE: [ActiveDir] ds* or joeware to get DN from email address

2006-02-10 Thread joe



If you want to match on any smtp address (primary or any 
secondaries)
 

adfind -gc -b -f 
"&(objectCategory=person)(proxyaddresses=smtp:[EMAIL PROTECTED])" -dn
 
That will hit every 
domain in the forest too. 
 
 

--
O'Reilly Active Directory Third Edition - http://www.joeware.net/win/ad3e.htm 
 
 


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Coleman, 
HunterSent: Friday, February 10, 2006 5:23 PMTo: 
ActiveDir@mail.activedir.orgSubject: RE: [ActiveDir] ds* or joeware 
to get DN from email address

adfind -default -f 
"&(objectCategory=person)([EMAIL PROTECTED])" dn
 
You can change your search base as necessary. This also 
assumes that you want to check the primary SMTP address, and not match on a 
secondary address.


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Teo De Las 
HerasSent: Friday, February 10, 2006 2:50 PMTo: 
ActiveDir@mail.activedir.orgSubject: [ActiveDir] ds* or joeware to 
get DN from email address

Are there any tools out there that can get me the DN from an email 
address?
 
I can write a script for this pretty easily, but I want to hand the 
task off to another admin that does not know scripting.  Having him use 
pre-existing tools will simplify things.
 
Teo


RE: [ActiveDir] ds* or joeware to get DN from email address

2006-02-10 Thread Coleman, Hunter



adfind -default -f 
"&(objectCategory=person)([EMAIL PROTECTED])" dn
 
You can change your search base as necessary. This also 
assumes that you want to check the primary SMTP address, and not match on a 
secondary address.


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Teo De Las 
HerasSent: Friday, February 10, 2006 2:50 PMTo: 
ActiveDir@mail.activedir.orgSubject: [ActiveDir] ds* or joeware to 
get DN from email address

Are there any tools out there that can get me the DN from an email 
address?
 
I can write a script for this pretty easily, but I want to hand the 
task off to another admin that does not know scripting.  Having him use 
pre-existing tools will simplify things.
 
Teo


[ActiveDir] ds* or joeware to get DN from email address

2006-02-10 Thread Teo De Las Heras
Are there any tools out there that can get me the DN from an email address?
 
I can write a script for this pretty easily, but I want to hand the task off to another admin that does not know scripting.  Having him use pre-existing tools will simplify things.
 
Teo