Skip to content

Commit b06e897

Browse files
authored
Merge pull request #97 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents e1ccb45 + c491a3d commit b06e897

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Modules/CIPPCore/Public/Set-CIPPAssignedPolicy.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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) {

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardIntuneTemplate.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)