COMMAND SHELL Flashcards
recursive where command
where command
find command
commands for finding files and directories and filtering
where
where /R
find
findstr
comp
fc
sort
local access to command prompt
Using the Windows key + r to bring up the run prompt, and then typing in cmd.
OR
Accessing the executable from the drive path C:\Windows\System32\cmd.exe
remote access to command prompt
command shell general commands
help
Get-help
Update-help
Ctrl-C
Get-Module
Import-Module
Get-Command
Set-Location <path>
Get-content <file>
systeminfo
hostname
ver</file></path>
help <command></command>
provides help information for windows commands
get-help <cmdlet></cmdlet>
displays help about Windows Powershell cmdlets and concepts
update-help
downloads and installs the most up to date help files for windows powershell
get-module
view the modules loaded into your powershell session
ctrl-c
interrupts the currently running process
import-module
import a module into your powershell session
get-command
view all commands,cmdlets,functions and aliases loaded into your powershell environment
set-location <path></path>
changes our location in the filesystem. same as using CD
get-content <file></file>
view the contents of an object. similar to type or cat
systeminfo
displays the operating system configuration information for a local or remote machine
hostname
Displays name of the current host
Terminal History Commands
doskey /history
page up
page down
f3
f7
f9
ver
Displays the current Windows version
Admin Commands
xfreerdp /v:<target> /u:<user> /p:<password>
ssh <user>@<target></target></user></password></user></target>
<PIPE>
</PIPE>
xfreerdp /v:<target> /u:<user> /p:<password></password></user></target>
Initiate a RDP connection with the target host.
Command Description
xfreerdp /v:<target> /u:<user> /p:<password> Initiate a RDP connection with the target host.
ssh <user>@<target></target></user></password></user></target>
Connect to a target host via SSH
<PIPE>
</PIPE>
When you see <PIPE> specified in the commands below, it is saying to use the Pipe key (shift+backslash on US Keyboard layouts).</PIPE>
File & Directory Commands
CMD.exe
dir
cd
cls
dir
dir /A
dir /A:H
dir /A:R
cd
chdir
tree
tree /F
mkdir
md
rmdir
rd
rmdir /S
move
xcopy
copy
xcopy /E
robocopy
xcopy /K
robocopy /E /MIR /A-:SH
more
more /S
fsutil file createNew
type
echo
ren
del
del /A:R