I just whipped up a little script.. I may post the UDF in the UDF forum (I thought it was handy anyways..)

code:
BREAK ON
CLS

IF Left(@kix,1) < 4
?"This script requires Kixtart 4.x"
SLEEP 2
EXIT
ELSE
$ldomain = @domain
$lstrusername = "servicesql"
$mailhost = "smtp.server.com"
$adminrecpt = "recipient@@server.com"
$userobj = GetObject("WinNT://$LDomain/$lstrUserName")
$pwexpire = $userobj.passwordexpirationdate

?"UserAuthor: " + $userobj.name
?"UserPasswordExpires: " + $pwexpire

$tt = SPLIT($pwexpire," ")
$mdy = SPLIT($tt[0],"/")
$expiredatearray = $mdy[2],$mdy[0],$mdy[1]
$currentdatearray = "@YEAR","@MONTHNO","@MDAYNO"


Function CalcDayofYear($ymdarray) ; Only works on non-millenium years after 2000.
$Calendar = 31,28,31,30,31,30,31,31,30,31,30,31
If VAL($ymdarray[0]) & 1 $Ly = 0 ; leap year calculations
Else
If (Val($ymdarray[0])/2) & 1 $Ly = 0
Else $Ly = 1
Endif
Endif
$calendar[1] = $calendar[1] + $LY
$mdays = 0
For $m = 0 to (Val($ymdarray[1]) -2)
$mdays = $mdays + $calendar[$m]
Next
$CalcDayofYear = $mdays + $ymdarray[2]
EndFunction

$daystoexpire = CalcDayofYear($expiredatearray) - CalcDayofYear($currentDateArray) + ((VAL($expiredatearray[0]) - VAL(currentdataArray[0])) * 365)

If $daystoexpire <= 2
? "Password Change required within 2 days, please change"
SHELL 'postie.exe -host:$MailHost -to:$AdminRecpt -from:"ServiceAccountChg" -s:"Password Change" -msg:"The service account: $lstrUserName needs to be changed."'
ELSE
? "Password will not expire for more than 2 Days, no action is needed"
ENDIF

ENDIF

What do you think? It works great for me.

Brian

[ 04 June 2002, 17:15: Message edited by: BrianTX ]