Skip to content

Commit

Permalink
domain analyser fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Oct 18, 2024
1 parent 9483db2 commit 0d617ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,19 @@ Function Invoke-ListBPA {
$Results = [PSCustomObject]@{
Data = @($Data)
Columns = @($Columns)
Keys = $Data | ForEach-Object {
$_.PSObject.Properties |
Where-Object { $_.Name -ne 'PartitionKey' -and $_.Name -ne 'RowKey' -and $_.Name -ne 'Timestamp' } |
ForEach-Object { $_.Name }
} | Select-Object -Unique
Style = $Style
}

if (!$Results) {
$Results = @{
Columns = @( value = 'Results'; name = 'Results')
Data = @(@{ Results = 'The BPA has not yet run.' })
Keys = @()
}
}

Expand Down
3 changes: 2 additions & 1 deletion Modules/CIPPCore/Public/Get-CIPPDomainAnalyser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ function Get-CIPPDomainAnalyser {
$DomainTable = Get-CIPPTable -Table 'Domains'

# Get all the things

#Transform the tenantFilter to the GUID.
$TenantFilter = (Get-Tenants -TenantFilter $tenantFilter).customerId
if ($TenantFilter -ne 'AllTenants' -and ![string]::IsNullOrEmpty($TenantFilter)) {
$DomainTable.Filter = "TenantGUID eq '{0}'" -f $TenantFilter
}
Expand Down

0 comments on commit 0d617ff

Please sign in to comment.