File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ function New-CIPPTemplateRun {
149149 JSON = " $object "
150150 RowKey = $ExistingPolicy.GUID
151151 PartitionKey = ' IntuneTemplate'
152+ Package = $ExistingPolicy.Package
152153 } - Force
153154 } else {
154155 " Policy $ ( $Template.DisplayName ) not found in existing templates, creating new template"
@@ -196,6 +197,7 @@ function New-CIPPTemplateRun {
196197 JSON = " $object "
197198 RowKey = $ExistingPolicy.GUID
198199 PartitionKey = ' IntuneTemplate'
200+ Package = $ExistingPolicy.Package
199201 } - Force
200202 } else {
201203 " Policy $ ( $Template.DisplayName ) not found in existing templates, creating new template"
@@ -237,6 +239,7 @@ function New-CIPPTemplateRun {
237239 JSON = " $object "
238240 RowKey = $ExistingPolicy.GUID
239241 PartitionKey = ' IntuneTemplate'
242+ Package = $ExistingPolicy.Package
240243 } - Force
241244 } else {
242245 " Policy $ ( $Template.DisplayName ) not found in existing templates, creating new template"
Original file line number Diff line number Diff line change @@ -42,12 +42,6 @@ function Import-CommunityTemplate {
4242 $excludedTenants = $ExistingJSON.excludedTenants
4343 $NewJSON.tenantFilter = $tenantFilter
4444 $NewJSON.excludedTenants = $excludedTenants
45-
46- # Extract package tag from existing template
47- $PackageTag = $Existing.Package
48- if ($PackageTag ) {
49- $Template | Add-Member - MemberType NoteProperty - Name Package - Value $PackageTag - Force
50- }
5145 }
5246 }
5347
@@ -169,6 +163,11 @@ function Import-CommunityTemplate {
169163 GUID = $ID
170164 RowKey = $ID
171165 }
166+
167+ if ($Existing -and $Existing.Package ) {
168+ $entity.Package = $Existing.Package
169+ }
170+
172171 Add-CIPPAzDataTableEntity @Table - Entity $entity - Force
173172
174173 }
You can’t perform that action at this time.
0 commit comments