Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » Adsi

List Account Expiration Dates in a Windows NT 4.0 Domain in Windows

You can use any of the VBScript programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.

List Account Expiration Dates in a Windows NT 4.0 Domain in Windows using VBScript, WMI and LDAP

Example(s)

On Error Resume Next

Set objDomain = GetObject("WinNT://fabrikam,domain")
objDomain.Filter = Array("User")

For Each objUser In objDomain
   If IsNull(objUser.AccountExpirationDate) Then
       Wscript.Echo objUser.Name, "Account has no expiration date."
   Else
       Wscript.Echo objUser.Name, objUser.AccountExpirationDate
   End If
Next