Msg 15122 Level 16 State 1 Line 1 The CHECK_EXPIRATION option cannot be used when CHECK_POLICY is OFF.

Error Message:

Msg 15122, Level 16, State 1, Line 1
The CHECK_EXPIRATION option cannot be used when CHECK_POLICY is OFF.

Fix/Resolution:
Turn On CHECK_POLICY in the script or remove CHECK_EXPIRATION from the script

Before:
[sql]
CREATE LOGIN [username] WITH PASSWORD=N’pa@Ssword’ , CHECK_EXPIRATION=ON, CHECK_POLICY=off
[/sql]

After:
[sql]
CREATE LOGIN [username] WITH PASSWORD=N’pa@Ssword’ , CHECK_EXPIRATION=ON, CHECK_POLICY=ON
[/sql]

OR

[sql]
CREATE LOGIN [username] WITH PASSWORD=N’pa@Ssword’
[/sql]