48 lines
929 B
PowerShell
48 lines
929 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")]
|
|
[string]$AuthMode = "AppOnly",
|
|
|
|
[string]$RedirectUri,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$ExportPath,
|
|
|
|
[string]$SettingsFile,
|
|
|
|
[string]$BatchFile,
|
|
|
|
[string]$NameFilter = "",
|
|
|
|
[string[]]$ObjectTypes = @(
|
|
"DeviceConfiguration",
|
|
"SettingsCatalog",
|
|
"AdministrativeTemplates",
|
|
"CompliancePolicies",
|
|
"EndpointSecurity",
|
|
"PolicySets"
|
|
),
|
|
|
|
[switch]$IncludeAssignments,
|
|
|
|
[switch]$AddCompanyName
|
|
)
|
|
|
|
$modulePath = Join-Path (Split-Path -Parent $PSScriptRoot) "Headless/IntuneManagement.Headless.psd1"
|
|
Import-Module $modulePath -Force
|
|
|
|
Export-IntunePolicies @PSBoundParameters
|