Skip to content

Commit

Permalink
add LoginType to returned [PSCustomObject]$user
Browse files Browse the repository at this point in the history
  • Loading branch information
avm committed Feb 5, 2019
1 parent 535405a commit 9286f97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/Get-DbaDbRoleMember.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@ function Get-DbaDbRoleMember {
Add-Member -Force -InputObject $user -MemberType NoteProperty -Name Database -Value $db.Name
Add-Member -Force -InputObject $user -MemberType NoteProperty -Name Role -Value $dbRole.Name
Add-Member -Force -InputObject $user -MemberType NoteProperty -Name UserName -Value $user.Name
Add-Member -Force -InputObject $user -MemberType NoteProperty -Name LoginType -Value $user.LoginType

# Select object because Select-DefaultView causes strange behaviors when assigned to a variable (??)
Select-Object -InputObject $user -Property 'ComputerName', 'InstanceName', 'SqlInstance', 'Database', 'Role', 'UserName', 'Login', 'IsSystemObject'
Select-Object -InputObject $user -Property 'ComputerName', 'InstanceName', 'SqlInstance', 'Database', 'Role', 'UserName', 'Login', 'IsSystemObject', 'LoginType'
}
}
}
Expand Down

0 comments on commit 9286f97

Please sign in to comment.