dsccommunity / dsccommunity/SqlServerDsc
SqlLogin: Defaults inconsistent with UI usage for creating a SQL Login
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the xSQLServerLogin resource and reproduce the supplied configuration on the stated SQL Server and PowerShell versions, comparing it with the UI behavior. Trace how LoginPasswordPolicyEnforced is handled when the two related policy settings are omitted; done means the DSC resource accepts that configuration and produces the same policy state without requiring explicit false values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, sql
- Domain
- authentication, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100