Skip to content

Commit 46f5fd2

Browse files
committed
add cippurl replacement
1 parent 88bfdc9 commit 46f5fd2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Modules/CIPPCore/Public/Get-CIPPTextReplacement.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ function Get-CIPPTextReplacement {
3737
'%programfiles%',
3838
'%programfiles(x86)%',
3939
'%programdata%',
40-
'%cippuserschema%'
40+
'%cippuserschema%',
41+
'%cippurl%'
4142
)
4243

4344
$Tenant = Get-Tenants -TenantFilter $TenantFilter
@@ -83,5 +84,13 @@ function Get-CIPPTextReplacement {
8384
$Schema = Get-CIPPSchemaExtensions | Where-Object { $_.id -match '_cippUser' } | Select-Object -First 1
8485
$Text = $Text -replace '%cippuserschema%', $Schema.id
8586
}
87+
88+
if ($Text -match '%cippurl%') {
89+
$ConfigTable = Get-CIPPTable -tablename 'Config'
90+
$Config = Get-CIPPAzDataTableEntity @ConfigTable -Filter "PartitionKey eq 'InstanceProperties' and RowKey eq 'CIPPURL'"
91+
if ($Config) {
92+
$Text = $Text -replace '%cippurl%', $Config.Value
93+
}
94+
}
8695
return $Text
8796
}

0 commit comments

Comments
 (0)