SqlServerDsc icon indicating copy to clipboard operation
SqlServerDsc copied to clipboard

SqlLogin: Defaults inconsistent with UI usage for creating a SQL Login

Open DarenDaigle opened this issue 8 years ago • 2 comments

Details of the scenario you tried and the problem that is occurring:

When creating a SQL Login using the UI, if you clear the follow the policy check box, the other two concerning policies are cleared and then grayed out.

If you create a login using the DSC resource using the same methodology, then the login fails with a very vague error. But will succeed if i forcible set the other two parameters to false.

I feel that this behavior should be mimicked in the resource as it can be assumed that disabling policy should not required the others.

The DSC configuration that is using the resource (as detailed as possible):

    xSQLServerLogin SQLUser {
        SQLServer                      = "$($Computer)"
        SQLInstanceName                = 'MSSQLSERVER'
        Name                           = 'SQL User'
        LoginPasswordPolicyEnforced    = $False
        LoginCredential                = $Node.SQLUser
        Ensure                         = 'Present'
        PSDSCRunAsCredential           = $Node.SQLAdminAccount
    }

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:

Windows 2012 R2 WMF 5.1

What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:

SQLServer 21.0.17099

Version of the DSC module you're using, or 'dev' if you're using current dev branch:

Resource V 7.1.0.0

DarenDaigle avatar Jun 26 '17 17:06 DarenDaigle

@DarenDaigle, what version of SQL Server and SSMS are you using? I'm wondering if the functionality in the interface has changed over the years.

randomnote1 avatar Jun 27 '17 15:06 randomnote1

Issue is present in SSMS for 2014 Issue is present in SSMS for 2012 Issue is present in SSMS for 2008 Issue is present in SSMS for 2005

DarenDaigle avatar Jun 28 '17 12:06 DarenDaigle