Is the requirement to ensure the apps install on Autopilot provisioned devices? If yes, then have you considered using device filters instead?
How to detect if a device is in Autopilot installation
Hi there,
we are using PSAppDeployToolkit for our app installations. Therein we have a check on whether the script is running in Autopilot or not. We use the the following code to detect if Autopilot is active:
$IsCloudExperienceHostBrokerRunning=(@(Get-Process CloudExperienceHostBroker -ErrorAction SilentlyContinue)).count -gt 0
[bool]$IsRunningInAutopilot =($IsCloudExperienceHostBrokerRunning -eq $true) -and (-not (Get-CimInstance -Namespace 'root\cimv2\mdm\dmmap' -ClassNam 'MDM_EnrollmentStatusTracking_Setup01' -ErrorAction Stop | Select-Object -ExpandProperty HasProvisioningCompleted))
Unfortunately since a few weeks the check doesn't work anymore because the process CloudExperienceHostBroker doesn't exist anymore. Does anyone have a good idea how to detect it now?
Thanks in advance.
3 answers
Sort by: Most helpful
-
-
Betz, Dominik 16 Reputation points
2022-11-21T05:41:07.17+00:00 We are working in a co-managed environment where the apps can be installed by the following means:
- During Autopilot
- During a SCCM Task sequence
- From company portal using either SCCM or Intune.
How would the implementation with device filters work?
Thanks in advance
-
Justin Dybedahl 0 Reputation points
2024-01-23T20:12:07.42+00:00 I know this is an old topic but wondering if there has been a solution found on this?