Re: How to list user's account password expire.
- From: "Marty List" <usenet@xxxxxxxxxxxx>
- Date: Thu, 20 Jul 2006 10:50:46 -0600
There's several ways to do this. You should post follow-ups in this group:
microsoft.public.windows.server.scripting
If you want to list a single account, start with this example from the TechNet
Script Center:
http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
If you want to display all accounts, start with this script. Save it with a
..VBS extension and then run it from a command prompt like this:
cscript.exe filename.vbs
''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Dim objDomain, objUser, PasswordAge, PasswordExpired
Set objDomain = GetObject("WinNT://MYDOMAIN,domain")
objDomain.Filter = Array("User")
Wscript.Echo "Account, PasswordAgeInDays, PasswordExpired"
For Each objUser In objDomain
PasswordAge = CLng(objUser.PasswordAge / 60 / 60 / 24)
PasswordExpired = CStr(CBool(objUser.PasswordExpired))
Wscript.Echo objUser.Name, PasswordAge, PasswordExpired
Next
''''''''''''''''''''''''''''''''''''''''''''''''''''
"B" <B@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:13A92F52-2C39-4FCE-89A8-A13D4AFC33F4@xxxxxxxxxxxxxxxx
Hi, I would like to know how to generate the list that shows when user's
account password expire. Is there any script? Thank you,
.
- Prev by Date: Re: Forest Two-Way Transative Trust Problem
- Next by Date: Re: Reset Local Administrator Password
- Previous by thread: Re: Limit User Access to one Folder
- Next by thread: Re: How to list user's account password expire.
- Index(es):
Relevant Pages
|