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 SMO properties for Get-DbaLogin #6340

Closed
tboggiano opened this issue Jan 26, 2020 · 5 comments
Closed

Return more SMO properties for Get-DbaLogin #6340

tboggiano opened this issue Jan 26, 2020 · 5 comments

Comments

@tboggiano
Copy link
Contributor

tboggiano commented Jan 26, 2020

Summary of new feature

There are some properties that would make writing a dbacheck for CIS easier and would be useful for users for dbatools as well that can be returned using SMO. I noticed issue #5732 as well, which I could combine into this as well if if were OK.

  • Clear/concise description of what the problem is that the new feature can solve.
    Would like to add from SMO:

Proposed technical details (if applicable)

  • e.g. Blog post reference that shows example code or functionality

Latest version of dbatools as of writing

  • Please provide the latest released version of dbatools module.
    1.0.88
@wsmelton
Copy link
Member

I'm ok with this but would be best to go ahead and add a format file I think this is one that would be good to force table output too.

@tboggiano
Copy link
Contributor Author

What is a format file, or just point me to module that is using one for an example?

@wsmelton
Copy link
Member

Actually never mind just forgot we use that Select-DefaultView instead of formatting files. #5732 was already handled in a PR, no one went back and closed it though.

The properties you noted are already available via the function. The exception would be MustChangePassword itself does not exists in SMO, that has to be grabbed via LOGINPROPERTY which is what got added in that PR. So it is IsMustChange.

We just don't return these on the default output, but this will still provide you those properties:

Get-DbaLogin ... | Select-Object IsMustChange, PasswordExpirationEnabled, PasswordPolicyEnforced

@tboggiano
Copy link
Contributor Author

I noticed the properties were there once I downloaded the code to work on it, but the -Detailed switch doesn't work to return the values. So I'll check in code to fix that minor problem.

@tboggiano
Copy link
Contributor Author

Well never mind I guess that is for people to provide what fields that one the same you just gave me I'll juts close this. Thanks.

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

No branches or pull requests

2 participants