From 9163a075aedac8d523c939050509f75f2fdeebb9 Mon Sep 17 00:00:00 2001 From: cfsnate <72530590+cfsnate@users.noreply.github.com> Date: Mon, 31 May 2021 16:11:44 -0400 Subject: [PATCH] add MDMDeploymentType --- Invoke-CMApplyDriverPackage.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Invoke-CMApplyDriverPackage.ps1 b/Invoke-CMApplyDriverPackage.ps1 index 9b744ef..09bac95 100644 --- a/Invoke-CMApplyDriverPackage.ps1 +++ b/Invoke-CMApplyDriverPackage.ps1 @@ -753,6 +753,12 @@ Process { $true { if ($ActiveMPExternalCandidatesCount -ge 1) { $Script:AdminServiceEndpointType = "External" + ##Force Internal by Variable MDMDeploymentType - this enables TS deployment after reboot with device vpn for offsite CGW OSD + $Script:DeploymentType = $TSEnvironment.Value("MDMDeploymentType") + if (-not([string]::IsNullOrEmpty($Script:DeploymentType))) { + $Script:AdminServiceEndpointType = $Script:DeploymentType + } + ### } else { Write-CMLogEntry -Value " - Detected as an Internet client but unable to determine External AdminService endpoint, bailing out" -Severity 3