File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -53,21 +53,16 @@ function Invoke-CIPPStandardsRun {
5353 Test-CIPPRerun - ClearAll - TenantFilter $TenantFilter - Type ' Standard'
5454 }
5555
56- # Get tenant list for batch processing
57- write-host " Getting tenants for filter: $TenantFilter "
58- $AllTenantsList = if ($TenantFilter -eq ' allTenants' ) {
59- Get-Tenants
60- } else {
61- Get-Tenants | Where-Object {
62- $_.defaultDomainName -eq $TenantFilter -or $_.customerId -eq $TenantFilter
63- }
56+ $StandardsParams = @ {
57+ TenantFilter = $TenantFilter
58+ runManually = $runManually
6459 }
65-
66- if ($AllTenantsList.Count -eq 0 ) {
67- Write-Information " No tenants found for filter $TenantFilter "
68- return
60+ if ($TemplateID ) {
61+ $StandardsParams [' TemplateId' ] = $TemplateID
6962 }
7063
64+ $AllTenantsList = Get-CIPPStandards @StandardsParams | Select-Object - ExpandProperty Tenant | Sort-Object - Unique
65+
7166 # Build batch of per-tenant list activities
7267 $Batch = foreach ($Tenant in $AllTenantsList ) {
7368 $BatchItem = @ {
You can’t perform that action at this time.
0 commit comments