Re: IF statement help..

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I guess that's part of the problem... how do you write an LDAP query to
determine if a user account is mail enabled? From looking at the LDP
record it doesn't seem like the Exchange fields are there so how could
I say "if field exists for user"?
Thanks,
Dan

Steven Burn wrote:
If objMember.Class = "user" AND (<LDAP query>) Then
... do something
End If

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

<dankennedy24@xxxxxxxxx> wrote in message
news:1156746774.583541.293580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
How can I make the following line go from

"if the class field of objmember is equal to user" then....
to
"if the class field of objmember is equal to user AND if the LDAP field
named mail exists in the record" then....

Here's my current if statement:

If ObjMember.Class = "user" Then

I ran into an issue in a result set where I captured user records and
asked my script to return the mail field but the mail field didn't
exist and that blows up my script.

Any help is appreciated.

Thanks,
Dan


.



Relevant Pages

  • IF statement help..
    ... "if the class field of objmember is equal to user" then.... ... asked my script to return the mail field but the mail field didn't ... exist and that blows up my script. ...
    (microsoft.public.scripting.vbscript)
  • Re: ldap query
    ... Import/export can be scheduled using a script or batch file ... > How does the outlook address book do it? ... shouldn't that statement work just as well in an LDAP query ...
    (microsoft.public.exchange.connectivity)
  • Re: ldap query
    ... maybe the script idea would be the easiest way? ... > which an LDAP query should be good enough for. ... >> Exchange requires the domain to be prep'd before it will build an address ... >>> addresses of the other domain using ldap queries. ...
    (microsoft.public.exchange.connectivity)
  • RE: AD Scripting problem
    ... But when I try my ldap query it doesn't ... Below is my script: ... > For Each strArgument in WScript.Arguments ... > strComputer = strArgument ...
    (microsoft.public.win2000.active_directory)
  • Re: Multiple Login
    ... > Directory schema with a minimum value of 0 and then edited the ... The logon script ... computer without running the logoff script that is supposed to ... you don't need to do a LDAP query at ...
    (microsoft.public.windowsxp.security_admin)