Core enhancements: - Expanded default export/import scope to ~45 object types including DeviceManagementIntents - Added -AllPages pagination support across Graph queries for large tenants - Invoke-GraphRequest now throws on 4xx/5xx instead of silently returning null - Added macOS Keychain fallback for secret retrieval in headless auth flow - Added NameSearchPattern/NameReplacePattern mutation support through export/import forms New toolkit scripts: - Bulk-AppAssignment.ps1: bulk-assign apps to groups/All Users/All Devices - Bulk-AssignmentManager.ps1: add/remove assignments for any policy type with correct @odata.type - Backup-Restore-Assignments.ps1: JSON backup with cross-tenant group resolution - Export-AssignmentsToCsv.ps1: CSV/Markdown documentation output - Bulk-RenamePolicies.ps1: regex search/replace and prefix mutations - Bulk-DeviceOperations.ps1: delete/retire/wipe/lock/sync with -WhatIf safeguards - Start-IntuneManagementTui.ps1: interactive terminal UI for headless operations - Create-IntuneManagementApp.ps1: helper for app registration setup Updated existing scripts: - Export-Policies.ps1 / Import-Policies.ps1: wired mutation params through - Start-HeadlessIntune.ps1: integrated TUI and new parameter forwarding
45 lines
875 B
PowerShell
45 lines
875 B
PowerShell
<#
|
|
.SYNOPSIS
|
|
Headless Intune policy export wrapper for macOS/Linux/Windows.
|
|
#>
|
|
[CmdletBinding()]
|
|
param(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$TenantId,
|
|
|
|
[string]$AppId,
|
|
|
|
[string]$Secret,
|
|
|
|
[string]$Certificate,
|
|
|
|
[ValidateSet("AppOnly","Browser","DeviceCode")]
|
|
[string]$AuthMode = "AppOnly",
|
|
|
|
[string]$RedirectUri,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$ExportPath,
|
|
|
|
[string]$SettingsFile,
|
|
|
|
[string]$BatchFile,
|
|
|
|
[string]$NameFilter = "",
|
|
|
|
[string]$NameSearchPattern = "",
|
|
|
|
[string]$NameReplacePattern = "",
|
|
|
|
[string[]]$ObjectTypes = (Get-DefaultIntunePolicyObjectTypes),
|
|
|
|
[switch]$IncludeAssignments,
|
|
|
|
[switch]$AddCompanyName
|
|
)
|
|
|
|
$modulePath = Join-Path (Split-Path -Parent $PSScriptRoot) "Headless/IntuneManagement.Headless.psd1"
|
|
Import-Module $modulePath -Force
|
|
|
|
Export-IntunePolicies @PSBoundParameters
|