0

Is there a way that I can enforce password policy on an entire instance so that I wouldn't have to do it on every login.

1 Answer 1

1

You can script it like this for every login, which is already there.

USE [master]
GO

SELECT 'ALTER LOGIN ['+name+'] WITH CHECK_POLICY=ON;'
,* FROM sys.sql_logins
WHERE is_policy_checked = 0
GO

Copy from the results what you want, and execute it in another query window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.