-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLServerRole uses contains() which is case sensitive #1153
Comments
Thanks for reporting this! Labeling this as bug and help wanted so anyone in the community can run with this. Would be great to get a regression test for this too, so the same problem does not return in the future. 🙂 |
Same problem. |
It is supported in SQL Server to have the same login with different casing (in sensitive collations). But it will fail when compiling the mof-file as mentioned here in issue #1191. |
This was resolved in PR #1453 since we can't enforce case-sensitivity in a mof resource. |
get-module -name sqlserverdsc -ListAvailable
ModuleType Version Name
Manifest 11.2.0.0 SqlServerDsc
https://github.com/PowerShell/SqlServerDsc/blob/dev/DSCResources/MSFT_SqlServerRole/MSFT_SqlServerRole.psm1#L113
The MemberstoInclude property currently uses the contains method.
if ( -not ($membersInRole.Contains($memberToInclude)))
This is case sensitive . . .
e.g
This is not desirable since possible the domain name or usename may be in a different case that the account already present on SQL.
The workaround might be to use the -In or the -contains operator.
The text was updated successfully, but these errors were encountered: