dellas
New Member
- Messages
- 1
- Reaction score
- 0
- Points
- 1
We have several devices showing a “Pending” status in Microsoft Entra ID.
The recommendation we received is to run the following commands to refresh the registration:
dsregcmd /leave
dsregcmd /join
This works perfectly when we run the commands manually on a local machine.
To automate the process, we created a PowerShell script using those commands and tested it locally — it runs without any issues.
However, when we deployed the same script through Microsoft Configuration Manager (SCCM) as a package, PowerShell doesn’t recognize the dsregcmd command.
I’ve already checked several options online, but none of the solutions worked.
Has anyone faced this issue with dsregcmd not being recognized when executed via SCCM?
Any advice or best practices to make this work in a deployment context would be appreciated.
The recommendation we received is to run the following commands to refresh the registration:
dsregcmd /leave
dsregcmd /join
This works perfectly when we run the commands manually on a local machine.
To automate the process, we created a PowerShell script using those commands and tested it locally — it runs without any issues.
However, when we deployed the same script through Microsoft Configuration Manager (SCCM) as a package, PowerShell doesn’t recognize the dsregcmd command.
I’ve already checked several options online, but none of the solutions worked.
Has anyone faced this issue with dsregcmd not being recognized when executed via SCCM?
Any advice or best practices to make this work in a deployment context would be appreciated.