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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user