I am in the process of putting my notes into web pages, please keep checking in later for more contents
mssql setspn     loginproperty    

login property and password hash


-- ------------

Use the Manipulate Service Principal Names for Accounts (SetSPN.exe) utility
loginproperty

SELECT 'IsLocked' AS Property, LOGINPROPERTY('interface', 'IsLocked') AS Value
union all
SELECT 'IsExpired' AS Property, LOGINPROPERTY('interface', 'IsExpired') AS Value
union all
SELECT 'DaysUntilExpiration' AS Property, LOGINPROPERTY('interface', 'DaysUntilExpiration') AS Value
union all
SELECT 'IsLocked' AS Property, LOGINPROPERTY('interface', 'IsMustChange') AS Value
union all
SELECT 'BadPasswordCount' AS Property, LOGINPROPERTY('interface', 'BadPasswordCount') AS Value
union all
SELECT 'PasswordLastSetTime' AS Property, LOGINPROPERTY('interface', 'PasswordLastSetTime') AS Value
union all
SELECT 'BadPasswordTime' AS Property, LOGINPROPERTY('interface', 'BadPasswordTime') AS Value
union all
SELECT 'LockoutTime' AS Property, LOGINPROPERTY('interface', 'LockoutTime') AS Value
union all
SELECT 'PasswordHash' AS Property, LOGINPROPERTY('interface', 'PasswordHash') AS Value
union all
SELECT 'PasswordHashAlgorithm' AS Property, LOGINPROPERTY('interface', 'PasswordHashAlgorithm') AS Value;
GO

DECLARE @my_login_name char(20);  
SET @my_login_name = 'interface';   
SELECT 'IsLocked' AS Property, LOGINPROPERTY(@my_login_name, 'IsLocked') AS Value
union all
SELECT 'IsExpired' AS Property, LOGINPROPERTY(@my_login_name, 'IsExpired') AS Value
union all
SELECT 'DaysUntilExpiration' AS Property, LOGINPROPERTY(@my_login_name, 'DaysUntilExpiration') AS Value
union all
SELECT 'IsLocked' AS Property, LOGINPROPERTY(@my_login_name, 'IsMustChange') AS Value
union all
SELECT 'BadPasswordCount' AS Property, LOGINPROPERTY(@my_login_name, 'BadPasswordCount') AS Value
union all
SELECT 'PasswordLastSetTime' AS Property, LOGINPROPERTY(@my_login_name, 'PasswordLastSetTime') AS Value
union all
SELECT 'BadPasswordTime' AS Property, LOGINPROPERTY(@my_login_name, 'BadPasswordTime') AS Value
union all
SELECT 'LockoutTime' AS Property, LOGINPROPERTY(@my_login_name, 'LockoutTime') AS Value
union all
SELECT 'PasswordHash' AS Property, LOGINPROPERTY(@my_login_name, 'PasswordHash') AS Value
union all
SELECT 'PasswordHashAlgorithm' AS Property, LOGINPROPERTY(@my_login_name, 'PasswordHashAlgorithm') AS Value;
GO