Page cover

3️⃣Users, Groups, Computers Enumeration

Get Information of domain controller

Get-NetDomainController
Get-NetDomainController | select-object Name

Get information on users in the domain

Get-NetUser
Get-NetUser -Username <username>

Get the list of all users

Get-NetUser | select samaccountname

Get the list of usernames, last logon, and password last set

Get-NetUser | select samaccountname, lastlogon, pwdlastset
Get-NetUser | select samaccountname, lastlogon, pwdlastset | Sort-Object -Property lastlogon

Get the list of usernames and their groups

Get-NetUser | select samaccountname, memberof

Get the list of all properties for users in the current domain

get-userproperty -Properties pwdlastset

Get description field from the user

Get computer information

Get computers with operating system ""

Get the list of all computer names and operating systems

List all groups of the domain

Get all the members of the group

Get the group membership of a user

List all the local groups on a machine (needs admin privs on non dc machines)

Get a Member of all the local groups on a machine (needs admin privs on non dc machines)

Get actively logged users on a computer (needs local admin privs)

Get locally logged users on a computer (needs remote registry rights on the target)

Get the last logged users on a computer (needs admin rights and remote registry on the target)

Last updated

Was this helpful?