Add headless macOS CLI workflow
This commit is contained in:
48
Scripts/Import-Policies.ps1
Normal file
48
Scripts/Import-Policies.ps1
Normal file
@@ -0,0 +1,48 @@
|
||||
<#
|
||||
.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,
|
||||
|
||||
[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
|
||||
Reference in New Issue
Block a user