Skip to Content
Mastering Active Directory
book

Mastering Active Directory

by Dishan Francis
June 2017
Beginner to intermediate
742 pages
18h 29m
English
Packt Publishing
Content preview from Mastering Active Directory

Removing Active Directory objects

Removing Active Directory objects can easily be compared to the creation or editing process. For removal, all you need to worry about is finding the exact object you need to remove.

In order to remove AD user objects, we can use the Remove-ADUser cmdlet. We can find the complete syntax information using the following command:

Get-Command Remove-ADUser -Syntax

When using the cmdlet, we need to pass the -Identity parameter to specify the account. We can use a distinguished name, GUID, SID, or the SamAccountName value to identify the name. If in an LDS environment, we need to define the object partition parameter too:

Remove-ADUser -Identity "dzhang"

The preceding command will remove the AD user object called ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Active Directory

Mastering Active Directory

Dishan Francis
Active Directory, 5th Edition

Active Directory, 5th Edition

Brian Desmond, Joe Richards, Robbie Allen, Alistair G. Lowe-Norris

Publisher Resources

ISBN: 9781787289352Supplemental Content