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
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.
Sign in to comment
Sort by: Most helpful
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