Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Searching for UserAccountControl settings that aren't set.

Reply
Thread Tools Display Modes

Searching for UserAccountControl settings that aren't set.

 
 
djmulls
Guest
Posts: n/a

 
      02-02-2011
Hi guys,

I have been asked to find all accounts in a resource domain that DON'T
have the 'Password never expires' and 'User must change password at
next logon' set. Accounts with these settings are giving us grief with
the rollout of a new mail app.

Now searching for accounts with those options is easy enough, I just
use 65336 and I get all 'Password never expires' however I can't
figure out how to get both of the above two options in a script and
still get every combination of other setting. For example we have a
lot of disabled accounts, but I still need to know if they have the
above two options ticked.

We are running a 2003 Native Mode domain and user accounts are all
over the place. So we can't just point this at a single OU.

I am scratching my head over this one so any help would be much
appreciated.
Thanks
David
 
Reply With Quote
 
 
 
 
Junior Member
Join Date: Apr 2011
Posts: 13

 
      06-21-2011
Use the output with dsget command


dsget user <UserDN> -mustchpwd

or check for pwdLastSet attribute value in vbscript (0 for enable, 1 disable)

How to extract the user who has the option Password never expires in the OU | Windows Tricks

Regards
Windows Tricks
FeedBurner Email Subscription
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: maintaining personal settings in domain change Ace Fekay [MVP-DS, MCT] Windows Server 1 04-17-2010 04:56 PM
Re: maintaining personal settings in domain change Ace Fekay [MVP-DS, MCT] Windows Small Business Server 1 04-17-2010 04:56 PM
Filter Multicast & Filter Internet NAT Redirection settings question Bob Windows Vista Security 0 03-12-2010 12:18 AM
RE: Group olicy for Internet Explorer Proxy settings not being applied Garry Starck - MCITP-EA Active Directory 0 03-10-2010 07:44 AM
Default view of folders reverts back to previous settings. Jeff Ingram Windows Vista File Management 28 04-07-2007 09:18 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59