Hello there,
You can use PowerShell to achieve this.
The Remove-ADUser cmdlet removes an Active Directory user.
The Identity parameter specifies the Active Directory user to remove. You can identify a user by its distinguished name (DN), GUID, security identifier (SID), or Security Account Manager (SAM) account name. You can also set the Identity parameter to a user object variable, such as $<localUserObject>, or you can pass a user object through the pipeline to the Identity parameter.
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer--