Use case: Use this procedure when you need to offboard a hybrid or cloud-only user in a consistent and repeatable way, for example during employee departures or account clean-up tasks. Automating the process via PowerShell allows you to schedule the process, run it in bulk, and couple it with additional steps to further customize the process.
To decommission a user via PowerShell, use one of the built-in cmdlets:
Hybrid users
Invoke-EEDecommissionHybridUser [-Identity] <string> [-Domain <string>]
Entra ID users
Invoke-EEDecommissionEntraUser [-Identity] <string> [-Tenant <string>]
- Start a PowerShell 7 command prompt using the same credentials you use to run EasyEntra.
- The cmdlet reads decommission settings and credentials from the EasyEntra configuration file stored in the Windows user profile.
- Modify the decommission settings by offboarding a user in the EasyEntra GUI or by manually editing the configuration file.
- Review the output after the process completes, either manually or programmatically.
- The overall completion status is available in the
Statusproperty[Completed | CompletedWithWarning | CompletedWithError | FatalError] - The decommission settings used to guide the process are available in the
DecommissionSettingsproperty of the result. - A detailed task log is available in the
TaskLogproperty of the result.
- The overall completion status is available in the
To schedule the process, ensure the scheduled task runs in the security context of a user account with a local user profile that holds the EasyEntra configuration and authentication.
Ensure that the scheduled task is protected, allowing only authorized personnel to modify job settings.
Additional PowerShell Cmdlets
EasyEntra includes additional PowerShell cmdlets for common administrative tasks.
To view the complete list of available PowerShell cmdlets, open Settings in EasyEntra.

Related Articles
- How to Decommission a Hybrid User
- How to Decommission an Entra ID User
- How to Configure Default Offboarding Values
- How to Create a User From a Virtual User Template via PowerShell