So I know that the AD attribute "UserAccountControl" is the sum of the
values of 21 different values (i.e., so a value of 546 = 2+32+512,
which is composed of the sum of the constants ACCOUNT_DISABLED,
PASSWORD_NOT_REQUIRED, and NORMAL_ACCOUNT). But how do I break that
down in Powershell? For example, I want to do certain actions if a
normal user account is disabled. However, I can't just check for a
value of 514 (2+512), since - like this example - the value may be
different, even tho this is an account I want to process. So how do I
go about testing for ACCOUNT_DISABLED within the total value of
"UserAccountControl"?

(in my case, I am planning to examine user home folders, and anyone
who is disabled, move them to a different holding folder. In our case,
the user login is used as the name of the folder, so I just need to
match the folder name with the "sAMAccountName" in AD)

Thanks

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Reply via email to