File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
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 ) {
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ function Invoke-CIPPStandardIntuneTemplate {
3737
3838 Write-Host ' starting template deploy'
3939 Write-Host " The full settings are $ ( $Settings | ConvertTo-Json ) "
40- $APINAME = ' Standards'
4140 foreach ($Template in $Settings ) {
4241 Write-Host " working on template deploy: $ ( $Template | ConvertTo-Json ) "
4342 try {
@@ -53,7 +52,7 @@ function Invoke-CIPPStandardIntuneTemplate {
5352
5453 } catch {
5554 $ErrorMessage = Get-NormalizedError - Message $_.Exception.Message
56- Write-LogMessage - API ' Standards' - tenant $tenant - message " Failed to create or update Intune Template $PolicyName , Error: $ErrorMessage " - sev ' Error'
55+ Write-LogMessage - API ' Standards' - tenant $tenant - message " Failed to create or update Intune Template $displayname , Error: $ErrorMessage " - sev ' Error'
5756 }
5857 }
5958 }
You can’t perform that action at this time.
0 commit comments