54 lines
1.1 KiB
PowerShell
54 lines
1.1 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Headless Intune policy import wrapper for macOS/Linux/Windows.
|
|
#>
|
|
[CmdletBinding()]
|
|
param(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$TenantId,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$AppId,
|
|
|
|
[string]$Secret,
|
|
|
|
[string]$Certificate,
|
|
|
|
[ValidateSet("AppOnly","Browser")]
|
|
[string]$AuthMode = "AppOnly",
|
|
|
|
[string]$RedirectUri,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$ImportPath,
|
|
|
|
[string]$SettingsFile,
|
|
|
|
[string]$BatchFile,
|
|
|
|
[string]$NameFilter = "",
|
|
|
|
[ValidateSet("alwaysImport","skipIfExist","replace","replace_with_assignments","update")]
|
|
[string]$ImportType = "alwaysImport",
|
|
|
|
[string[]]$ObjectTypes = @(
|
|
"DeviceConfiguration",
|
|
"SettingsCatalog",
|
|
"AdministrativeTemplates",
|
|
"CompliancePolicies",
|
|
"EndpointSecurity",
|
|
"PolicySets"
|
|
),
|
|
|
|
[switch]$IncludeAssignments,
|
|
|
|
[switch]$IncludeScopeTags,
|
|
|
|
[switch]$ReplaceDependencyIds
|
|
)
|
|
|
|
$modulePath = Join-Path (Split-Path -Parent $PSScriptRoot) "Headless/IntuneManagement.Headless.psd1"
|
|
Import-Module $modulePath -Force
|
|
|
|
Import-IntunePolicies @PSBoundParameters
|