Deleting user accounts

The Active Directory PowerShell module has a cmdlet called Remove-ADUser to delete user accounts from Active Directory. Alternatively, the Remove-ADObject cmdlet can be used. The Remove-ADUser cmdlet is designed to deal with user accounts removal. We will use this cmdlet throughout the examples in this section.

The requests for removal of user accounts increase as the attrition rate increases in your organization. You get requests from HR to delete user accounts on a frequent basis either when an employee leaves the organization or he/she turns down the offer just before joining.

Tip

Most organizations won't delete user accounts when an employee leaves the organization. Instead, they will hide these from the Global Address ...

Get Active Directory with PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.