Powershell2 Flashcards
What commandlet would return all of the commandlets that contain the noun ‘service’?
get-command -noun service
There are currently 34 common group verbs in Powershell. Name as many as you can.
---- ----- Add Common Clear Common Close Common Copy Common Enter Common Exit Common Find Common Format Common Get Common Hide Common Join Common Lock Common Move Common New Common Open Common Optimize Common Pop Common Push Common Redo Common Remove Common Rename Common Reset Common Resize Common Search Common Select Common Set Common Show Common Skip Common Split Common Step Common Switch Common Undo Common Unlock Common Watch Common
What ‘service’ commandlets are available?
There are 8 service commandlets available:
get new restart resume set start stop suspend
What commandlet lists all the different services?
get-service
What commandlet would return detailed help on a command?
Use get-service in the example
get-help get-service -detailed
What commandlet will show what processes are running?
get-process
What commandlet will return one process?
In your example return the notepad process
get-process -name notepad
get-process notepad will also work
What is a method in Powershell?
A method is the different things we can do to an object. Quite often we use a car analogy
eg;
car-stop
car-start
car-opendoor
What commandlet would create a variable for:
get-process notepad
Call the variable ‘test’
$test = get-process notepad
After creating a variable, what is the first thing we should do?
Test it
What command shows the version of Powershell that is installed?
$PSVersiontable