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

Return more properties about Login #5841

Merged
merged 6 commits into from
Jun 29, 2019
Merged

Return more properties about Login #5841

merged 6 commits into from
Jun 29, 2019

Conversation

sqllensman
Copy link
Contributor

@sqllensman sqllensman commented Jun 29, 2019

Type of Change

  • Bug fix (non-breaking change, fixes Return more properties about Login (Get-DbaLogin) #5732 )
  • New feature (non-breaking change, adds functionality)
  • Breaking change (effects multiple commands or functionality)
  • Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
  • Nunit test is included
  • Documentation
  • Build system

Purpose

Implement the changes for Feature request #5732

Approach

Added option to use SQL Query to get LoginProperty information for
BadPasswordCount
BadPasswordTime
DaysUntilExpiration
HistoryLength
IsMustChange
LockoutTime
PasswordHash
PasswordLastSetTime

Commands to test

Get-DbaLogin

@potatoqualitee
Copy link
Member

great idea! how about -Detailed instead of GetLoginProperty ?

@sqllensman
Copy link
Contributor Author

Ok.
I will update now

@sqllensman
Copy link
Contributor Author

The ealier Pull request to fix #5840 should have failed as it was missing the $FilePath parameter at Line 418

@wsmelton
Copy link
Member

I disagree with the detailed parameter here. We spent previous time removing that from every command moving toward 1.0.0.

Why are we know reverting back to it?

@sqllensman
Copy link
Contributor Author

I have no opinion either way.
Only reason I added a switch is avoid overhead of running query for every login if information is not wanted.

@potatoqualitee
Copy link
Member

Detailed was used without thought or patterns in previous commands. In this case, like Patrick mentioned, it's being used to avoid the overhead of running a query for every login if information is not wanted.

In this case, Detailed is justified and intentional.

@potatoqualitee potatoqualitee merged commit ba48768 into dataplat:development Jun 29, 2019
@wsmelton
Copy link
Member

So switch it to use SMO instead of the query. I haven't verified all but some of those can be returned via SMO: https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.management.smo.login.passwordhashalgorithm?view=sql-smo-140.17283.0

@sqllensman sqllensman deleted the LoginProperty branch July 5, 2019 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return more properties about Login (Get-DbaLogin)
3 participants