Skip to content

Commit

Permalink
fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasKur committed Dec 11, 2021
1 parent 13f35d4 commit c4a8d2e
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Function Get-AssignmentDetailSingle(){
MemberCount = $MemberCount
GroupType = $GType
DynamicRule = $DynamicRule
Intent = "-"
Source = ""
AssignType = "Include"
}
} else {

Expand All @@ -67,27 +70,24 @@ Function Get-AssignmentDetailSingle(){
MemberCount = "-"
GroupType = "BuilIn"
DynamicRule = "-"
Intent = "-"
Source = ""
AssignType = "Include"
}
}

#Intent if Available
if($null -ne $Assignment.intent){
$returnObj | Add-Member -MemberType NoteProperty -Name "Intent" -Value $Assignment.intent
} else {
$returnObj | Add-Member -MemberType NoteProperty -Name "Intent" -Value "-"
}
$returnObj.Intent = $Assignment.intent
}
# Source
if($null -ne $Assignment.source){
$returnObj | Add-Member -MemberType NoteProperty -Name "Source" -Value $Assignment.source
} else {
$returnObj | Add-Member -MemberType NoteProperty -Name "Source" -Value "-"
}
$returnObj.Source = $Assignment.source
}
# Include or Exclude
if($Assignment.'@odata.type' -imatch 'exclusion'){
$returnObj | Add-Member -MemberType NoteProperty -Name "Type" -Value "Exclude"
} else {
$returnObj | Add-Member -MemberType NoteProperty -Name "Type" -Value "Include"
}
if($Assignment.target.'@odata.type' -like "*exclu*"){
$returnObj.AssignType = "Exclude"
}

$returnObj
}

0 comments on commit c4a8d2e

Please sign in to comment.