Skip to content
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

SqlServerLogin: Some verbose strings does not output correctly #1096

Closed
johlju opened this issue Mar 26, 2018 · 0 comments · Fixed by #1240
Closed

SqlServerLogin: Some verbose strings does not output correctly #1096

johlju opened this issue Mar 26, 2018 · 0 comments · Fixed by #1240
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub

Comments

@johlju
Copy link
Member

johlju commented Mar 26, 2018

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

The verbose string below should contain the current state of each property, for example it should say ...is a WindowsUser rather than SqlLogin but it says ...is a rather than SqlLogin (note the $null value between a rather). This is thru for some of the other strings in the below output.

This happens when the login does not exist. The verbose output should hanlde this better. For example maybe it should not write these lines of verbose output when the account is new ('Absent').

VERBOSE: [TEST1]:                            [[SqlServerLogin]NewLogin] 2018-03-26_12-16-58: Getting the login 'TestUser1' from 'test1\MSSQLSERVER'
VERBOSE: [TEST1]:                            [[SqlServerLogin]NewLogin] 2018-03-26_12-16-58: The login 'TestUser1' is Absent from the 'test1\MSSQLSERVER' instance.
VERBOSE: [TEST1]:                            [[SqlServerLogin]NewLogin] 2018-03-26_12-16-58: The login 'TestUser1' on the instance 'test1\MSSQLSERVER' is Absent rather than Present
VERBOSE: [TEST1]:                            [[SqlServerLogin]NewLogin] 2018-03-26_12-16-58: The login 'TestUser1' on the instance 'test1\MSSQLSERVER' is a  rather than SqlLogin
VERBOSE: [TEST1]:                            [[SqlServerLogin]NewLogin] 2018-03-26_12-16-58: The login 'TestUser1' on the instance 'test1\MSSQLSERVER' has PasswordExpirationEnabled set to  rather than False
VERBOSE: [TEST1]:                            [[SqlServerLogin]NewLogin] 2018-03-26_12-16-58: The login 'TestUser1' on the instance 'test1\MSSQLSERVER' has PasswordPolicyEnforced set to  rather than False

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

        SqlServerLogin AddNTServiceClusSvc
        {
            Ensure               = 'Present'
            Name                 = 'TestUser1'
            LoginType            = 'SqlLogin'
            ServerName           = $Node.NodeName
            InstanceName         = $Node.InstanceName
            PsDscRunAsCredential = $SqlAdministratorCredential
        }

Version of the operating system and PowerShell the target node is running

Any

SQL Server edition and version the target node is running

Any

What SQL Server PowerShell modules, and which version, are present on the target node.

n/a

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

Dev

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. easy fix good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub labels Mar 26, 2018
@johlju johlju removed the easy fix label Apr 29, 2018
jpomfret added a commit to jpomfret/SqlServerDsc that referenced this issue Oct 10, 2018
@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Oct 10, 2018
johlju pushed a commit to jpomfret/SqlServerDsc that referenced this issue Dec 28, 2018
johlju pushed a commit to jpomfret/SqlServerDsc that referenced this issue Dec 31, 2018
johlju pushed a commit that referenced this issue Jan 1, 2019
…ogin is not present on server (#1240)

- Change to SqlServerLogin so it doesn't check properties for absent logins.
   - Fix for (issue #1096).
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Projects
None yet
1 participant