diff --git a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Standards/Push-CIPPStandard.ps1 b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Standards/Push-CIPPStandard.ps1 index 964cd1d9294e..276c90519a39 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Standards/Push-CIPPStandard.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Standards/Push-CIPPStandard.ps1 @@ -7,17 +7,17 @@ function Push-CIPPStandard { $Item ) - Write-Host "Received queue item for $($Item.Tenant) and standard $($Item.Standard)." + Write-Information "Received queue item for $($Item.Tenant) and standard $($Item.Standard)." $Tenant = $Item.Tenant $Standard = $Item.Standard $FunctionName = 'Invoke-CIPPStandard{0}' -f $Standard - Write-Host "We'll be running $FunctionName" - $Rerun = Test-CIPPRerun -Type Standard -Tenant $Tenant -Settings $Item.Settings -API $Standard + Write-Information "We'll be running $FunctionName" + $Rerun = Test-CIPPRerun -Type Standard -Tenant $Tenant -API $Standard if ($Rerun) { - Write-Host 'Detected rerun. Exiting cleanly' + Write-Information 'Detected rerun. Exiting cleanly' exit 0 } else { - Write-Host "Rerun is set to false. We'll be running $FunctionName" + Write-Information "Rerun is set to false. We'll be running $FunctionName" } try { & $FunctionName -Tenant $Item.Tenant -Settings $Item.Settings -ErrorAction Stop diff --git a/Modules/CIPPCore/Public/GraphHelper/Get-Tenants.ps1 b/Modules/CIPPCore/Public/GraphHelper/Get-Tenants.ps1 index 446a1c5fc5ac..99dafa852de2 100644 --- a/Modules/CIPPCore/Public/GraphHelper/Get-Tenants.ps1 +++ b/Modules/CIPPCore/Public/GraphHelper/Get-Tenants.ps1 @@ -216,5 +216,5 @@ function Get-Tenants { } } - return ($IncludedTenantsCache | Where-Object { $null -ne $_.defaultDomainName -and ($_.defaultDomainName -notmatch 'Domain Error' -or $IncludeAll.IsPresent) } | Sort-Object -Property displayName) + return ($IncludedTenantsCache | Where-Object { $null -ne $_.defaultDomainName -and ($_.defaultDomainName -notmatch 'Domain Error' -or $IncludeAll.IsPresent) -and $IncludedTenantFilter } | Sort-Object -Property displayName) }