sp_helplogins
doesn't show a column for this. I need a listing of all logins, with the status of their "Enforce password policy" checkbox. This is for an auditor, and the standard practice is for screenshots of every login. I'd prefer to make this simpler on me (to generate) and simpler on them to audit.
2 Answers
Here's the start of a report:
SELECT
sp.name AS LoginName,
sl.is_policy_checked AS IsPasswordPolicyEnforced
FROM sys.server_principals sp
LEFT OUTER JOIN sys.sql_logins sl ON sl.principal_id = sp.principal_id
WHERE sp.type IN ('S', 'G', 'U');
Note that this property only applies to SQL logins.
Hmph. Found it : https://stackoverflow.com/questions/3244387/help-needed-to-write-sql-query-for-sql-logins
SELECT name, is_policy_checked FROM sys.sql_logins