只需要几行代码就可以完成所要求的功能了:
Set oUser = GetObject("WinNT://DomainName/UserName", user) Wscript.echo oUser.PasswordExpirationDate