Enumerating Users
PowerView
Enumerate all users with all properties in current domain
Get-NetUserEnumerate a specific user with all properties in current domain
Get-NetUser -UserName <USERNAME>Enumerate all users with all properties in another domain
Get-NetUser -Domain <DOMAIN NAME>Enumerate a specific user with all properties in another domain
Get-NetUser -UserName <USERNAME> -Domain <DOMAIN NAME>Search for users in current domain that matches with a specific keyword
Get-NetUser | ?{$_.Name -match "keyword"}Get username & user principal name of all users in current domain
Get-NetUser | Select samaccountname,userprincipalnameGet username & user principal name of all users in another domain
Get-NetUser -Domain <DOMAIN NAME> | Select samaccountname,userprincipalnameGet username & user principal name of a specific user in current domain
Get-NetUser -UserName <USERNAME> | Select samaccountname,userprincipalnameGet username & user principal name of a specific user in another domain
Get-NetUser -UserName <USERNAME> -Domain <DOMAIN NAME> | Select samaccountname,userprincipalnameGet username, GUID, SID and LDAP's ADS path of all users in current domain
Get-NetUser | Select samaccountname,objectguid,objectsid,adspath | flGet username, GUID, SID and LDAP's ADS path of all users in another domain
Get-NetUser -Domain <DOMAIN NAME> | Select samaccountname,objectguid,objectsid,adspath | flGet username, Last logged on, Last log off, Password Last Set and Bad password Time of a specific user in current domain
Get-NetUser -UserName <USERNAME> | Select samaccountname,lastloggedon,lastlogoff,pwdlastset,badpasswordtime | ftGet username, Last logged on, Last log off, Password last set and Bad password Time of all users in another domain
Get-NetUser -Domain <DOMAIN NAME> | Select samaccountname,lastloggedon,lastlogoff,pwdlastset,badpasswordtime | ftGet users in current domain with group membership
Get-NetUser | Select samaccountname,memberofGet users in another domain with group membership
Get-NetUser -Domain <DOMAIN NAME> | Select samaccountname,memberofGet description of all users in current domain
Get-NetUser | Select samaccountname,descriptionGet description of all users in another domain
Get-NetUser -Domain <DOMAIN NAME> | Select samaccountname,descriptionActive Directory Module
Enumerate all users with default properties in current domain using Active Directory Module
Get-ADUser -Filter * Enumerate user with default properties in current domain using Active Directory Module
Get-ADUser -Identity <USERNAME> Enumerate all users with all properties in current domain using Active Directory Module
Get-ADUser -Filter * -Properties *Enumerate user with all properties in current domain using Active Directory Module
Get-ADUser -Properties * -Identity <USERNAME>Last updated