-
Notifications
You must be signed in to change notification settings - Fork 224
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
SqlLogin: Get-TargetResource "thinks" login exists, when it doesn't. #792
Comments
Thanks for reporting this and thanks for the detailed error report! I see the logic is flawed in the function It never sets If nobody beats me to it I will look into fixing this issue. |
This issue is also in respect of the old, Additionally, as per comments in PR #1652, the Can this issue be closed? |
Closing this, if this is still an issue please reopen or comment and we reopen. |
Details of the scenario you tried and the problem that is occurring:
Using xSQLServerLogin thus:
DSC reports the user is present:
But the user is not and if I run
Get-TargetResource
, it reports correctly that it is not present:If I call your function
Connect-SQL
directly, you can see there are only two users:The same result if I run
SELECT * from master.sys.server_principals
from SSMS. (There are SERVER_ROLE types returned, but not "SomeUser").The DSC configuration that is using the resource (as detailed as possible):
I've reduced it down to just the above and I'm still seeing the same result.
The whole configuration. Can't get any more simple:
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
Windows Server 2012 R2, SQL Server 2016,
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
No SqlServer module on this server.
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
8.1.0.0 Master, except I removed all the resources with very long names so it works!
Happy to demo this issue to any MS employee.
The text was updated successfully, but these errors were encountered: