Skip to content

Commit

Permalink
Added Logging
Browse files Browse the repository at this point in the history
Currently no value is returned if the user is not a member of any groups. Amended this.
  • Loading branch information
Jr7468 authored May 3, 2024
1 parent 5efdba2 commit 9781a61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Modules/CIPPCore/Public/Remove-CIPPGroups.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@ function Remove-CIPPGroups {
"Could not remove $($using:Username) from group $($Groupname): $($_.Exception.Message). This is likely because its a Dynamic Group or synched with active directory"
}
}
if (!$Returnval) {
$Returnval = "$($Username) is not a member of any groups."
Write-LogMessage -user $ExecutingUser -API $APIName -message "$($Username) is not a member of any groups" -Sev 'Info' -tenant $TenantFilter
}
return $Returnval
}

0 comments on commit 9781a61

Please sign in to comment.