Skip to content

Commit d3003b7

Browse files
committed
filter standardscompare list
1 parent 73f75c8 commit d3003b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-ListStandardsCompare.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ function Invoke-ListStandardsCompare {
1717
$Table.Filter = "PartitionKey eq '{0}'" -f $TenantFilter
1818
}
1919

20-
$Standards = Get-CIPPAzDataTableEntity @Table
20+
$Tenants = Get-Tenants -IncludeErrors
21+
$Standards = Get-CIPPAzDataTableEntity @Table | Where-Object { $_.PartitionKey -in $Tenants.defaultDomainName }
2122

2223
#in the results we have objects starting with "standards." All these have to be converted from JSON. Do not do this is its a boolean
2324
<#$Results | ForEach-Object {
@@ -57,7 +58,7 @@ function Invoke-ListStandardsCompare {
5758
$HexEncodedName = $Matches[2]
5859
$Chars = [System.Collections.Generic.List[char]]::new()
5960
for ($i = 0; $i -lt $HexEncodedName.Length; $i += 2) {
60-
$Chars.Add([char][Convert]::ToInt32($HexEncodedName.Substring($i,2),16))
61+
$Chars.Add([char][Convert]::ToInt32($HexEncodedName.Substring($i, 2), 16))
6162
}
6263
$FieldName = "$Prefix$(-join $Chars)"
6364
}

0 commit comments

Comments
 (0)