feat(export): use the Graph batch API by default for headless export
Headless export now fetches objects 20 per $batch call (was one call per object because UseBatchAPI defaulted to off). -NoBatchApi on Export-Policies.ps1 / Start-HeadlessIntune.ps1 falls back to single calls. Adds per-run setting overrides ($global:SettingOverrides, consulted by Get-SettingValue, set by Invoke-IntuneHeadlessBatch and never persisted). Verify on a tenant by exporting with and without -NoBatchApi and comparing the two folders with Compare-Tenants.py.
This commit is contained in:
@@ -792,6 +792,12 @@ function Get-SettingValue
|
||||
{
|
||||
param($Key, $DefaultValue, [switch]$GlobalOnly, [switch]$TenantOnly, $TenantID)
|
||||
|
||||
# Per-run overrides (e.g. set by the headless layer); never persisted to Settings.json
|
||||
if($global:SettingOverrides -is [hashtable] -and $global:SettingOverrides.ContainsKey($Key))
|
||||
{
|
||||
return $global:SettingOverrides[$Key]
|
||||
}
|
||||
|
||||
$settingObj = $null
|
||||
foreach($section in $global:appSettingSections)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user