Re: IF Statement....

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks a bunch for the reply... but I still seem to be returning the
disabled users... I also tried editing the final line of your code to
be

IF NOT ((objUser.userAccountControl AND 2) = 2)

However, that didn't work either ;-(

Any other tries are definitely appreciated.

Dan

McKirahan wrote:
<dankennedy24@xxxxxxxxx> wrote in message
news:1156813017.368290.147530@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
I'm attempting to write an if statement such that all of the
following are true:

1. Objmember.class is equal to publicfolder, user or group
2. While satsifying one of the above it's also true that the user have
something set in the proxyaddresses filed (this is my elementary check
for mail being enabled)
3. While being a member of one of the three classes in number 1 and
having mail enabled the user account control cannot be 2 which would
mean the object is disabled. So, it must be an enabled account.

Here's what I have:

If ObjMember.Class = "pulicfolder" OR objmember.class = "user" OR
objmember.class = "group" AND objmember.proxyaddresses <> "" AND NOT
((objUser.userAccountControl AND 2) = 2) Then

So as I'm sure you guessed, this doesn't work... any ideas?

Perhaps:

If objMember.class = "pulicfolder" _
Or objMember.class = "user" _
Or objMember.class = "group" Then
If objMember.proxyAddresses <> "" Then
If objUser.userAccountControl <> 2 Then
'...
End If
End If
End If

.



Relevant Pages

  • Hex Value Moves
    ... MOVE SPECNAM-CH-E5 TO TESTCHAR01A. ... MVI statements... ... associated with it that the other WS fields do not, eg (some editing as ... strictly scientific quantity of 'a whole bunch' of printing would have to ...
    (comp.lang.cobol)
  • Re: DVR-Edit and processing files afterwards . . .
    ... Or will editing the DVR-MS file with DVR-Edit cause the file to be permanenty a DVR type file. ... What I'm trying to do is free up hard drive space by removing parts of the DVR-MS files that I don't want prior to processing. ... I'd like to save a bunch of performances from various shows and then when I get enough of them, burn one DVD with all the performances on it. ... For a proper editing package take a look at the very wonderful Videoredo ...
    (microsoft.public.windows.mediacenter)
  • Re: Ping OHMSTER
    ... Do a bunch of editing; more than one para; make lines lengths ugly. ... When I use vim as my editor in slrn, the lines wrap by themselves so the F5 ... Look at the macro. ...
    (news.software.readers)
  • Re: back and forth, with hilarious consequences
    ... Pillock wrote: ... Novel. ... Currently editing chapter 5, have a bunch more in a giant glob ...
    (misc.writing)