You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Get-CIPPTextReplacement.ps1
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -44,8 +44,12 @@ function Get-CIPPTextReplacement {
44
44
'%organizationid%'
45
45
)
46
46
47
-
$Tenant=Get-Tenants-TenantFilter $TenantFilter
48
-
$CustomerId=$Tenant.customerId
47
+
if ($TenantFilter-ne$env:TenantID) {
48
+
$Tenant=Get-Tenants-TenantFilter $TenantFilter
49
+
$CustomerId=$Tenant.customerId
50
+
} else {
51
+
$CustomerId=$TenantFilter
52
+
}
49
53
50
54
#connect to table, get replacement map. The replacement map will allow users to create custom vars that get replaced by the actual values per tenant. Example:
51
55
# %WallPaperPath% gets replaced by RowKey WallPaperPath which is set to C:\Wallpapers for tenant 1, and D:\Wallpapers for tenant 2
0 commit comments