A. You can use the following script, which you can download at http://www.windowsitpro.com/content/content/48309/nopwdexpiry.zip to query the userAccountControl attribute of each user to check whether the account is flagged with "Password never expires" setting. Note that some lines wrap because of space limitations:

'listnopwdexpiry.vbs
' John Savill 20 October 2005

Option Explicit

Dim strLdapPath, objConnection, objChild, userFlag
Const ADS_UF_DONT_EXPIRE_PASSWD = &H10000

' Check whether all required arguments have been passed.
If Wscript.Arguments.Count

Pass the script to the path to the user's container that you want to check by using the following command:
<pre>
D:\Temp>cscript listnopwdexpiry.vbs cn=users,dc=savilltech,dc=com

which displays the following output:

Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

CN=Administrator
CN=Clark Kent
CN=Emmaline Savill
CN=Guest
CN=IUSR_SAVDALDC01
CN=IWAM_SAVDALDC01
CN=John Savill
CN=SUPPORT_388945a0
Operation Completed