Skip to content

Commit 80016c0

Browse files
committed
Compress JSON output in New-CIPPIntuneTemplate
Added the -Compress flag to ConvertTo-Json when serializing the template object, reducing the size of the generated JSON output.
1 parent 39abb7e commit 80016c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/CIPPCore/Public/New-CIPPIntuneTemplate.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function New-CIPPIntuneTemplate {
5151
'configurationPolicies' {
5252
$Type = 'Catalog'
5353
$Template = New-GraphGetRequest -uri "https://graph.microsoft.com/beta/deviceManagement/$($urlname)('$($ID)')?`$expand=settings" -tenantid $TenantFilter | Select-Object name, description, settings, platforms, technologies, templateReference
54-
$TemplateJson = $Template | ConvertTo-Json -Depth 100
54+
$TemplateJson = $Template | ConvertTo-Json -Depth 100 -Compress
5555
$DisplayName = $Template.name
5656

5757
}

0 commit comments

Comments
 (0)