PowerShell
Basic
# PS Locations
C:\windows\syswow64\windowspowershell\v1.0\powershell
C:\Windows\System32\WindowsPowerShell\v1.0\powershell
# For Windows PowerShell (v5.x)
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
# For PowerShell 7 (if installed)
"C:\Program Files\PowerShell\7\pwsh.exe"
# Check PS version
$PSVersionTable.PSVersion
# Check if shell is 64bit
[Environment]::Is64BitOperatingSystem
# Fix PATH to resolve "Command not found" errors in reverse shell
set PATH=C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0;%PATH%
set PATH=%PATH%C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0;Last updated