I'm trying to figure out how to verify, via scripting, if an account has "enforce password policy" and "enforce password expiration" set. I looked at LOGINPROPERTY but it only tells me if the password needs to be changed, is expired, or things relating to the immediate and not policy settings on the account.
I've checked server_principals, server_role_members (those two together may get me what I need for something else), sysusers. I've looked at the BOL for sp_helpuser and sp_helplogins.
I see where you can set the values when you create or alter the account but I just want to see if it is set, and it has to be in a script because this stuff is automatically and periodically executed and the results emailed to various people.
Does anyone have suggestions on where I might find this kind of account information?