I set an expirydate on my Domain User account. Then logged into the domain with this account and ran this:

 Code:
Break On

$= SetOption("WrapAtEol","On")

$objSysInfo = CreateObject("ADSystemInfo") 

$strUser = $objSysInfo.UserName 

$objUser = GetObject("LDAP://"+$strUser)

?"Your account expires on " + $objUser.AccountExpirationDate + "." 

? @SERROR

Exit 0


The result was:

M:\>kix32 test

Your account expires on 1/1/2008 1:00:00 AM.
The operation completed successfully.