Powershell2 Flashcards

1
Q

What commandlet would return all of the commandlets that contain the noun ‘service’?

A

get-command -noun service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

There are currently 34 common group verbs in Powershell. Name as many as you can.

A
----        -----
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What ‘service’ commandlets are available?

A

There are 8 service commandlets available:

get
new
restart
resume
set
start
stop
suspend
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What commandlet lists all the different services?

A

get-service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What commandlet would return detailed help on a command?

Use get-service in the example

A

get-help get-service -detailed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What commandlet will show what processes are running?

A

get-process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What commandlet will return one process?

In your example return the notepad process

A

get-process -name notepad

get-process notepad will also work

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a method in Powershell?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What commandlet would create a variable for:
get-process notepad

Call the variable ‘test’

A

$test = get-process notepad

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

After creating a variable, what is the first thing we should do?

A

Test it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What command shows the version of Powershell that is installed?

A

$PSVersiontable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly