1.1 Current Username
Commands:
echo %USERNAME%
whoami
Or, using PowerShell:
Description:
Displays the username of the currently logged-in user.
Output:
The current username is shown.
Commands:
Or, for a more detailed view in PowerShell:
Get-LocalUser | Format-Table Name, Enabled, LastLogon
Or, to list user profiles:
Get-ChildItem C:\Users -Force | Select-Object Name
Description:
Lists all local user accounts, showing their status and last logon time.
Output:
A list of all users on the system.
1.3 User Privileges
Commands:
To display privileges:
To view group memberships:
For comprehensive user details:
Description:
These commands provide detailed information about user privileges and group memberships.
Output:
Displays user privileges, group memberships, and other detailed information.
2.1 List All Local Groups
Commands:
Or, using PowerShell:
Description:
Lists all local groups on the system.
Output:
Displays a list of local groups.
2.2 Group Details
Commands:
To view members of a specific group (e.g., Administrators):
For detailed member information using PowerShell:
Description:
Provides details about the members of a specified local group.
Output:
Lists the group members, including their source (local or domain).
3. Domain Controller Commands
3.1 Get Domain Controllers
Commands:
To list domain controllers:
To get the current domain controller:
To query for a domain controller based on specific criteria:
Description:
Queries the domain for information about domain controllers.
Output:
Displays domain controllers' names and details, useful for network configuration and security assessments.