Skip to content

Commit

Permalink
Merge pull request #42 from mbrancato/master
Browse files Browse the repository at this point in the history
Add additional check for empty SID parameter
  • Loading branch information
rvazarkar authored Aug 26, 2016
2 parents 12556c0 + 565aa58 commit 47bf7e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PowerShell/BloodHound.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14555,7 +14555,9 @@ function Export-BloodHoundCSV {
}
}
elseif($Object.PSObject.TypeNames -contains 'PowerView.GPOLocalGroup') {
$MemberSimpleName = Convert-SidToName -SID $Object.ObjectSID | Convert-ADName -InputType 'NT4' -OutputType 'Canonical'
if(![string]::IsNullOrEmpty($Object.SID)){
$MemberSimpleName = Convert-SidToName -SID $Object.ObjectSID | Convert-ADName -InputType 'NT4' -OutputType 'Canonical'
}

if($MemberSimpleName) {
$MemberDomain = $MemberSimpleName.Split('/')[0]
Expand Down

0 comments on commit 47bf7e4

Please sign in to comment.