From 9286f97eeaee224e7d42f1b7ac9b08e92efe59e0 Mon Sep 17 00:00:00 2001 From: avm Date: Tue, 5 Feb 2019 13:13:35 +0300 Subject: [PATCH] add LoginType to returned [PSCustomObject]$user --- functions/Get-DbaDbRoleMember.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/Get-DbaDbRoleMember.ps1 b/functions/Get-DbaDbRoleMember.ps1 index ff0f676a3f..47cd8d868a 100644 --- a/functions/Get-DbaDbRoleMember.ps1 +++ b/functions/Get-DbaDbRoleMember.ps1 @@ -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' } } }