Basic PowerShell for Pentesters
Default PowerShell locations
C:\windows\syswow64\windowspowershell\v1.0\powershell
C:\Windows\System32\WindowsPowerShell\v1.0\powershellBasic PS commands to start
Get-Help * #List everything loaded
Get-Help process #List everything containing "process"
Get-Help Get-Item -Full #Get full helpabout a topic
Get-Help Get-Item -Examples #List examples
Import-Module <modulepath>
Get-Command -Module <modulename>Download & Execute
Download & Execute in background with AMSI Bypass
Using b64 from linux
Download
System.Net.WebClient
Invoke-WebRequest
Wget
BitsTransfer
Base64 Kali & EncodedCommand
Enable WinRM (Remote PS)
Disable Defender
AMSI bypass
AMSI Bypass 2 - Managed API Call Hooking
AMSI Bypass 3 - SeDebug Privilege
AMSI Bypass - More Resources
PS-History
Find a newer files
Get permissions
OS version and HotFixes
Environment
Other connected drives
Recycle Bin
Domain Recon
PowerView/SharpViewUsers
Secure String to Plaintext
SUDO
Groups
Clipboard
Processes
Services
Password from secure string
Scheduled Tasks
Network
Port Scan
Interfaces
Firewall
Route
ARP
Hosts
Ping
SNMP
Converting the SDDL String into a Readable Format
Last updated

