Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED Task Sequence not deploying device in Intune

Status
Not open for further replies.

BasPeeperkorn

New Member
Messages
3
Reaction score
0
Points
1
Hi all,

We have a SCCM environment with 1 PSS in Azure and a DP with PXE boot enabled on 24 remote locations.
Last month i updated SCCM from 1806 to 1902 (just before 1906 was released), the issues already persisted before the update.

We enroll Windows 10 1803 to Generic devices (AD-Joined) and to BYOD devices (AAD-joined) using 2 different Task Sequences.
The main difference between them is that the AD-Joined devices are managed by SCCM using the SCCM client.
The AAD-joined devices are managed by Intune, the SCCM client is removed in the last step in the Task Sequence.

The problem is that since a couple of months, some clients (clean or already imaged) cannot remove the SCCM client in the last AAD-joined TS step.
The system admin sees the 'Administrator' login screen and not a 'use a work-or-school-account' login.
After re-running the Task Sequence a couple more times on the same computer, it is correctly connected to Intune MDM and not visible in SCCM.

We use a PowerShell script to configure this, i attached the script to this thread, is it possible that someone can support me with this?
An besides using Microsoft AutoPilot, what alternatives are there left?

Thanks in advance.
 

Attachments

what about using co-management instead of removing the client? https://docs.microsoft.com/en-us/sccm/comanage/overview

also can you test deploying the script from inTune after enrollment?

i just had a glance of your script, i know there is a -wait argument in your ccmsetup.exe /uninstall. however, am a bit concerned about your #Stop Services that might interrupt the uninstall process.
 
Last edited:
the other thing what you can do with your script is to check if the uninstall process completed.

Code:
if($?)
{
   "command succeeded"
  #Remove everything else...
}
else
{
   "command failed"
}
 
Hi Edy, co-management is not an option for this customer, already advised it.

Can i also let the script put some errors (when failing the command) into the Deployment Monitoring and what is the best way to construct this?
 
am not across inTune at all, so i guess you can check for ccmexec.exe service if its running? then its considered as a failure..
 
I managed to solve this, at first the PowerShell script was copied to the C:\company\temp folder.
In the next TS step the script was run on the machine locally.

Now i run the script directly from the TS and it works like a charm.
 
Status
Not open for further replies.

Forum statistics

Threads
7,165
Messages
27,971
Members
18,271
Latest member
prashantrm

Trending content

Back
Top