Skip to content

Commit 8bd3ef1

Browse files
authored
Merge pull request #428 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 86e98b2 + 604e754 commit 8bd3ef1

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
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
}

Modules/CIPPCore/Public/Functions/Get-CIPPTenantAlignment.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ function Get-CIPPTenantAlignment {
5858
$Standards = if ($TenantFilter) {
5959
$AllStandards | Where-Object { $_.PartitionKey -eq $TenantFilter }
6060
} else {
61-
$AllStandards
61+
$Tenants = Get-Tenants -IncludeErrors
62+
$AllStandards | Where-Object { $_.PartitionKey -in $Tenants.defaultDomainName }
6263
}
6364

6465
# Build tenant standards data structure

profile.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ if (!$LastStartup -or $CurrentVersion -ne $LastStartup.Version) {
4343
Write-Information "Version has changed from $($LastStartup.Version ?? 'None') to $CurrentVersion"
4444
if ($LastStartup) {
4545
$LastStartup.Version = $CurrentVersion
46+
$LastStartup | Add-Member -MemberType NoteProperty -Name 'PSVersion' -Value $PSVersionTable.PSVersion.ToString()
4647
} else {
4748
$LastStartup = [PSCustomObject]@{
4849
PartitionKey = 'Version'
4950
RowKey = $env:WEBSITE_SITE_NAME
5051
Version = $CurrentVersion
52+
PSVersion = $PSVersionTable.PSVersion.ToString()
5153
}
5254
}
5355
Update-AzDataTableEntity @Table -Entity $LastStartup -Force -ErrorAction SilentlyContinue

0 commit comments

Comments
 (0)