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

Find-DbaLoginInGroup throws error when adding multiple groups to output #7396

Merged
merged 1 commit into from
Jun 6, 2021

Conversation

gbargsley
Copy link
Contributor

Type of Change

  • Bug fix (non-breaking change, fixes # )
  • New feature (non-breaking change, adds functionality, fixes # )
  • Breaking change (effects multiple commands or functionality, fixes # )
  • 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

When running the function, occasionally an op_Addition error is thrown in the code when adding new groups to the variable.

Approach

I added the declaration of the variable outside of the loop so that the addition error stops.

Commands to test

$LoginGroup = Find-DbaLoginInGroup -SqlInstance $SQLInstance | Where-Object {$Logins.LoginType -eq "WindowsGroup"}

Screenshots

image

Learning

@wsmelton wsmelton merged commit 8bda66f into development Jun 6, 2021
@wsmelton wsmelton deleted the Find-DbaLoginInGroup-AdditionError branch June 6, 2021 04:41
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.

None yet

2 participants