Skip to content

Commit db36ca0

Browse files
test
1 parent 59ba351 commit db36ca0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ function Invoke-CIPPStandardIntuneTemplate {
5555
Write-Host "IntuneTemplate: $($Template.TemplateList.value) - Failed to get existing."
5656
}
5757
if ($ExistingPolicy) {
58+
Write-Host "IntuneTemplate: $($Template.TemplateList.value) - Found existing policy."
5859
$RawJSON = Get-CIPPTextReplacement -Text $RawJSON -TenantFilter $Tenant
5960
$JSONExistingPolicy = $ExistingPolicy.cippconfiguration | ConvertFrom-Json -ErrorAction SilentlyContinue
6061
$JSONTemplate = $RawJSON | ConvertFrom-Json
6162
$Compare = Compare-CIPPIntuneObject -ReferenceObject $JSONTemplate -DifferenceObject $JSONExistingPolicy -compareType $Request.body.Type -ErrorAction SilentlyContinue
63+
} else {
64+
Write-Host "IntuneTemplate: $($Template.TemplateList.value) - No existing policy found."
6265
}
6366
if ($Compare) {
67+
Write-Host "IntuneTemplate: $($Template.TemplateList.value) - Compare found differences."
6468
[PSCustomObject]@{
6569
MatchFailed = $true
6670
displayname = $displayname
@@ -75,6 +79,7 @@ function Invoke-CIPPStandardIntuneTemplate {
7579
templateId = $Template.TemplateList.value
7680
}
7781
} else {
82+
Write-Host "IntuneTemplate: $($Template.TemplateList.value) - No differences found."
7883
[PSCustomObject]@{
7984
MatchFailed = $false
8085
displayname = $displayname

0 commit comments

Comments
 (0)