Strip legacy UI and keep headless runtime
This commit is contained in:
@@ -71,11 +71,11 @@ function Invoke-IntuneHeadlessBatch
|
||||
Test-AuthParameters -Secret $Secret -Certificate $Certificate
|
||||
|
||||
$projectRoot = Get-IntuneManagementProjectRoot
|
||||
$startScript = Join-Path $projectRoot "Start-IntuneManagement.ps1"
|
||||
$runtimeModule = Join-Path $projectRoot "Runtime/IntuneManagement.Runtime.psd1"
|
||||
|
||||
if(-not (Test-Path $startScript))
|
||||
if(-not (Test-Path $runtimeModule))
|
||||
{
|
||||
throw "Could not find Start-IntuneManagement.ps1 in $projectRoot"
|
||||
throw "Could not find IntuneManagement.Runtime.psd1 in $projectRoot"
|
||||
}
|
||||
|
||||
$settingsPath = Resolve-HeadlessSettingsPath $SettingsFile
|
||||
@@ -109,7 +109,8 @@ function Invoke-IntuneHeadlessBatch
|
||||
$invokeParams.Certificate = $Certificate
|
||||
}
|
||||
|
||||
& $startScript @invokeParams
|
||||
Import-Module $runtimeModule -Force
|
||||
Initialize-IntuneManagementRuntime -View "IntuneGraphAPI" @invokeParams
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -1,40 +1,27 @@
|
||||
# IntuneManagement Headless
|
||||
# Headless Runtime
|
||||
|
||||
This is the CLI-first surface for a cross-platform fork of the original IntuneManagement project.
|
||||
This folder contains the reusable CLI module for the repo.
|
||||
|
||||
The original project is still a Windows WPF application. This layer treats that codebase as an implementation backend and exposes a smaller product surface focused on:
|
||||
## Module
|
||||
|
||||
* app-only authentication
|
||||
* headless export/import
|
||||
* macOS/Linux/Windows execution with `pwsh`
|
||||
* automation and CI usage
|
||||
* [IntuneManagement.Headless.psd1](/Users/avedelphina/Local/IntuneManagement/Headless/IntuneManagement.Headless.psd1)
|
||||
* [IntuneManagement.Headless.psm1](/Users/avedelphina/Local/IntuneManagement/Headless/IntuneManagement.Headless.psm1)
|
||||
|
||||
## Entry points
|
||||
## Exported commands
|
||||
|
||||
* [Start-HeadlessIntune.ps1](/Users/avedelphina/Local/IntuneManagement/Start-HeadlessIntune.ps1)
|
||||
* [Scripts/Export-Policies.ps1](/Users/avedelphina/Local/IntuneManagement/Scripts/Export-Policies.ps1)
|
||||
* [Scripts/Import-Policies.ps1](/Users/avedelphina/Local/IntuneManagement/Scripts/Import-Policies.ps1)
|
||||
* [Headless/IntuneManagement.Headless.psd1](/Users/avedelphina/Local/IntuneManagement/Headless/IntuneManagement.Headless.psd1)
|
||||
|
||||
## Default policy scope
|
||||
|
||||
The default object types are:
|
||||
|
||||
* `DeviceConfiguration`
|
||||
* `SettingsCatalog`
|
||||
* `AdministrativeTemplates`
|
||||
* `CompliancePolicies`
|
||||
* `EndpointSecurity`
|
||||
* `PolicySets`
|
||||
* `Get-DefaultIntunePolicyObjectTypes`
|
||||
* `Export-IntunePolicies`
|
||||
* `Import-IntunePolicies`
|
||||
* `Invoke-IntunePolicyAction`
|
||||
|
||||
## Example
|
||||
|
||||
```powershell
|
||||
pwsh ./Start-HeadlessIntune.ps1 `
|
||||
-Action Export `
|
||||
Import-Module ./Headless/IntuneManagement.Headless.psd1
|
||||
|
||||
Export-IntunePolicies `
|
||||
-TenantId "<source-tenant-id>" `
|
||||
-AppId "<app-id>" `
|
||||
-Secret "<client-secret>" `
|
||||
-ExportPath "/tmp/intune-export" `
|
||||
-IncludeAssignments
|
||||
-ExportPath "/tmp/intune-export"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user