you will want to use ADSI for this....

here is something to get you sarted on the password age bit...

code:
$usernamefromfile = @userid

$user = getobject("WinNT://@domain/$usernamefromfile")
$temp = split($user.PasswordExpirationDate,"/")
$temp[2] = substr($temp[2],1,4)
if len($temp[0]) <> 2
$temp[0] = "0" + $temp[0]
endif
$expdate = $temp[2] + "/" + $temp[0] + "/" + $temp[1]


? "number of days until " + $user.name + " will expire is " + val(serialdate($expdate) - serialdate(@date)) + " (" + $user.PasswordExpirationDate + ")"

as for email... BLAT is a very good program, i am guessing that along with a list of user names you also have a list of email addresses?

Bryce

[ 01 August 2002, 03:17: Message edited by: Bryce ]