User Enumeration

User Enumeration

Get a list of users in the current domain

Get-DomainUser 
Get-DomainUser -Identity student1 
Get-ADUser -Filter * -Properties * 
Get-ADUser -Identity student1 -Properties *

Get list of all properties for users in the current domain

Get-DomainUser -Identity student1 -Properties *
Get-DomainUser -Properties samaccountname,logonCount
Get-ADUser -Filter * -Properties * | select -First 1 | Get-Member -MemberType *Property | select Name
Get-ADUser -Filter * -Properties * | select name,logoncount,@{expression={[datetime]::fromFileTime($_.pwdlastset)}}

Search for a particular string in a user's attributes:

Get-DomainUser -LDAPFilter "Description=*built*" | Select name,Description
Get-ADUser -Filter 'Description -like "*built*"' -Properties Description | select name,Description

Last updated