...which is why subtracting the current password age from the max password age gives you "days before password expires" hence

Code:

$daysLeft = @MaxPWAge - @PWAge
? "your password will expire in " $daysLeft " days"