File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ function Set-CIPPAssignedPolicy {
5252 }
5353 default {
5454 Write-Host " We're supposed to assign a custom group. The group is $GroupName "
55- $GroupNames = $GroupName -split ' \s,\s '
55+ $GroupNames = $GroupName.Split ( ' , ' ).Trim()
5656 $GroupIds = New-GraphGetRequest - uri ' https://graph.microsoft.com/beta/groups?$select=id,displayName&$top=999' - tenantid $TenantFilter |
5757 ForEach-Object {
5858 foreach ($SingleName in $GroupNames ) {
@@ -75,7 +75,7 @@ function Set-CIPPAssignedPolicy {
7575 }
7676 if ($ExcludeGroup ) {
7777 Write-Host " We're supposed to exclude a custom group. The group is $ExcludeGroup "
78- $ExcludeGroupNames = $GroupName -split ' \s,\s '
78+ $ExcludeGroupNames = $ExcludeGroup .Split ( ' , ' ).Trim()
7979 $ExcludeGroupIds = New-GraphGetRequest - uri ' https://graph.microsoft.com/beta/groups?$select=id,displayName&$top=999' - tenantid $TenantFilter |
8080 ForEach-Object {
8181 foreach ($SingleName in $ExcludeGroupNames ) {
You can’t perform that action at this time.
0 commit comments