🍗 Wiki

PowerShell

PowerShell

PowerShell is open source cross-platform shell program that supports powerful commands.

It is installed in Windows by default. But PowerShell is cross platform shell program, so it can be installed in MacOS and Linux. Even though it is different from normal Linux shell like Bash, but you can use most of 'commands' and features of normal Linux Bash shell scripting.

1. (Quite) Equivalent command of GNU/Linux tools and commands

1.1. cat

Get-Content or gc.

PS > Get-Content flag.txt
flag{You_l34rn_h0w_2_use_PwSH}
PS > gc flag.txt
flag{You_l34rn_h0w_2_use_PwSH}

1.2. touch to create a new empty file

New-Item or ni.

ps > New-Item hello.txt
ps > ni hello.txt

Will do the same.

2. Obfuscation of Script

PowerShell is case insensitive. Despite the commands above are all capitalized, You can get same results if you do not capitalize it.

3. See Also

  • PowerSploit was a collection of modules and commands for post exploitation of (mostly) Windows.