Powershell 1 Flashcards

1
Q

What is Powershell used for?

A

Task Automation and Configuration Management

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

What Commandlet would you use at the start of your session to record your input into Powershell and save it as a text file?

A

start-transcript

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

How would you complete a commandlet without typing it fully?

A

Press ‘Tab’ key

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

If you want to get help on a particular commandlet and also some examples of how the commandlet is used, what command would you use?

(create a command that shows help and examples of the Get-service commandlet)

A

get-help get-service -examples

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

If you want to get help for a particular commandlet online, what command would you use?

(create a command that shows online help for the Get-service commandlet)

A

get-help get-service -online

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

A Powershell command that doesn’t use the form of verb-noun is known as an……..?

A

Alias

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

Using the example of the Alias ‘CLS’ to clear your screen, what Powershell command would you use to find the Powershell commandlet?

A

get-alias cls

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

What character is a variable always preceded with?

A

$

Dollar Sign

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

What command would assign the word ‘hello’ to the commandlet get-date ?

A

$hello = get-date

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

What commandlet would you use to show a list of all the commands you have run in your session?

A

get-history

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

What commandlet would show what the execution policy is set to?

A

get-executionpolicy

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

What command would you use to go the following location:

C:\Users\petej\Documents

A

set-location c:\users\petej\documents

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

What command would show the properties and Methods of a commandlet?

(Use get-service in your example)

A

get-service | get-member

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

What command would show the status of the services on the device?

(We only want to see the name and the status column)

A

get-service | select-object name,status

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

CLS is used to clear the screen. CLS is the alias of which Powershell commandlet?

A

clear-host

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

What does ISE stand for?

A

Integrated Scripting Environment