and CORRECT Answers
Set - CORRECT ANSWER - view all env variables in command shell
wher - CORRECT ANSWER - find executables within the PATH variable
echo - CORRECT ANSWER - outputs strings passed to it
dir - CORRECT ANSWER - list folder contents
type - CORRECT ANSWER - output contents of a file
findstr - CORRECT ANSWER - windows grep
grep - CORRECT ANSWER - search the input files for line(s) containing a match to a
given pattern list
hostname - CORRECT ANSWER - system hostname
date /t - CORRECT ANSWER - output system date (/t keeps it from trying to set)
time /t - CORRECT ANSWER - output system time (/t keeps it from trying to set)
.bat - CORRECT ANSWER - batch file
> - CORRECT ANSWER - redirect STDOUT. Create/Overwrite
,>> - CORRECT ANSWER - redirect STDOUT. Create/Append
| - CORRECT ANSWER - piping sends output of one command to input of another
& and ; - CORRECT ANSWER - execute second command regardless of success/failure
of first
&& - CORRECT ANSWER - execute second command ONLY if the first is successful
|| - CORRECT ANSWER - execute second command ONLY if first fails
echo . - CORRECT ANSWER - print blank line
@echo off - CORRECT ANSWER - the @ suppresses display of the line in a batch file
echo A=%A% - CORRECT ANSWER - prints the variable
dir /s - CORRECT ANSWER - recursive
dir /a:h - CORRECT ANSWER - show hidden files
net user - CORRECT ANSWER - list of all users
net user admin - CORRECT ANSWER - detailed output of admin account / local group
membership
net localgroup - CORRECT ANSWER - view all local groups on computer
, net localgroups administrators - CORRECT ANSWER - view members of administrator
group
net use t:\\computername\c$ /persistent:no - CORRECT ANSWER - establish a temp drive
dir t:\users - CORRECT ANSWER - use temp drive
net use t: /delete - CORRECT ANSWER - remove the t: drive label
wmic /? - CORRECT ANSWER - explain global switches and aliases
wmic process /? - CORRECT ANSWER - shows all the running processes. This is object
oriented and can be sorted by headers
wmic process get /all /format:list - CORRECT ANSWER - all process details in list format
wmic process list brief - CORRECT ANSWER - shows an output similar to tasklist in a
legible format
wmic service list brief - CORRECT ANSWER - shows all the services that are running
wmic useraccount list brief - CORRECT ANSWER - shows all the users on the machine
wmic nicconfig list brief - CORRECT ANSWER - NIC information
wmic nteventlog list brief - CORRECT ANSWER - list logs