Skip to content

Commit 5a3a512

Browse files
committed
add string formatting for replacemap
1 parent f5e78da commit 5a3a512

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/CIPPCore/Public/Set-CIPPIntunePolicy.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ function Set-CIPPIntunePolicy {
1717
$ReplaceMap = Get-CIPPAzDataTableEntity @ReplaceTable -Filter "PartitionKey eq '$tenantFilter'"
1818
if ($ReplaceMap) {
1919
foreach ($Replace in $ReplaceMap) {
20-
$RawJSON = $RawJSON -replace $Replace.RowKey, $Replace.Value
20+
$String = '%{0}%' -f $Replace.RowKey
21+
$RawJSON = $RawJSON -replace $String, $Replace.Value
2122
}
2223
}
2324
#default replacements for all tenants: %tenantid% becomes $tenant.customerId, %tenantfilter% becomes $tenant.defaultDomainName, %tenantname% becomes $tenant.displayName

0 commit comments

Comments
 (0)