CMD and PowerShell enumeration

Command Prompt Enumeration

User Enumeration:

  • To list all domain users:

    net user /domain
  • To retrieve detailed information for a specific user:

    net user [USER] /domain

Group Enumeration:

  • To list all domain groups:

    net group /domain
  • To view members of a specific group:

    net group "[Group]" /domain

Password Policy:

  • To access the domain's password policy:

    net accounts /domain

PowerShell Enumeration:

User Enumeration:

  • To list all domain users using PowerShell:

  • To retrieve detailed information for a specific user on a specific domain controller:

  • To search for users whose names match a specific pattern:

  • To list all group memberships for a user:

Group Enumeration:

To list all domain groups using PowerShell:

To retrieve information about a specific group on a specific domain controller:

To list members of a specific group on a specific domain controller:

Get Domain Admins

Get groups that are members of Domain Admins. This script will look through all direct members and their group members. It will only show groups, not users (use Bloodhound).

AD Objects:

  • To perform a generic search for AD objects based on a specified date:

  • To enumerate accounts with a bad password count greater than 0:

Domains:

  • To retrieve domain information on a specific domain controller:

For Comprehensive Enumeration:

For more comprehensive enumeration, consider using tools like Sharphound and Bloodhound.

Last updated