Skip to Content
Mastering Active Directory - Second Edition
book

Mastering Active Directory - Second Edition

by Dishan Francis
August 2019
Intermediate to advanced
786 pages
20h 22m
English
Packt Publishing
Content preview from Mastering Active Directory - Second Edition

Finding objects using PowerShell

In the previous section, we learned about the Get-ADUser and Get-ADComputer cmdlets and how they can be used with other commands to filter out objects from AD. They can also be used to retrieve specific attribute values from filtered objects:

Get-ADUser -Identity user1 -Properties *

The preceding command will list all of the attributes and values associated with user1. This helps us to find the exact attribute names and common values, which can be used for further filtering.

I need to know the values for Name, UserPrincipalName, and Modified for all of the users. The following command will create a table with relevant attributes and their values:

Get-ADUser -Filter * -Properties Name,UserPrincipalName,Modified ...
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 - Third Edition

Mastering Active Directory - Third Edition

Dishan Francis
Active Directory, 5th Edition

Active Directory, 5th Edition

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

Publisher Resources

ISBN: 9781789800203Supplemental Content