SqlLogin: Defaults inconsistent with UI usage for creating a SQL Login
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, what version of SQL Server and SSMS are you using? I'm wondering if the functionality in the interface has changed over the years.
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