Deck 10: Scripting in Windows 10 and Centos 7

Full screen (f)
exit full mode
Question
What character can you use to break cmdlets between parameters when using PowerShell?

A)ampersand
B)backtick
C)asterisk
D)underscore
Use Space or
up arrow
down arrow
to flip the card.
Question
When you write a script, what type of line should you include to ensure that the script is run under the correct shell?

A)header line
B)shell id
C)location line
D)debug line
Question
When creating and executing scripts in CentOS 7, you must change the permissions on the file before running the new script.
Question
PowerShell ISE is an Integrated Scripting Environment that is included with Windows 10.
Question
Microsoft's PowerShell Script pane is an "automatic completion" feature that helps you develop scripts quickly.
Question
What key feature in the PowerShell ISE allows a user to display clickable menus of cmdlets, parameters, parameter values, files, or folders that match the characters you type?

A)Context-sensitive Help
B)Drag and drop
C)Error display
D)IntelliSense
Question
What specific configurable PowerShell script runs automatically each time the ISE starts?

A)user
B)profile
C)context
D)preference
Question
Where does the output appear when you run a script in the PowerShell ISE?

A)Top pane
B)Console pane
C)Command-Add-on pane
D)Scripting pane
Question
What PowerShell command written with a trace parameter will enable script tracing?

A)Set-Trace
B)Set-PSDebug
C)Get-PSDebug
D)Get-Trace
Question
What PowerShell cmdlet will allow you to Select items to remain in a table after filtering out unwanted items?

A)Filter-Data
B)Where-Object
C)Where-Data
D)Hold-Object
Question
What is an alternative to the Help cmdlet when you need to locate a specific cmdlet?

A)Get-Command
B)Help-Command
C)Get-Help
D)Alt-Help
Question
When a PowerShell user needs additional help regarding a cmdlet that will create a file, what command syntax can be used to help obtain this information?

A)cmdlet "create file"
B)"create file" Help
C)Help "create file"
D)"create file" cmdlet
Question
When using filtering in PowerShell you need to know the comparison operators, what operator allows you to see whether an identical value exists in a list of values?

A)-identical
B)-exist
C)-contains
D)-le
Question
To find a cmdlet that obtains process values, use the Get-Command -noun Process command.
Indicate the answer choice that best completes the statement or answers the question.
Question
In CentOS 7 using an extension on script files is optional. However, some Linux system administrators prefer to add a file extension to their scripts. What file extension is commonly used for this purpose?

A).exe
B).rt
C).bt
D).sh
Question
The CD command is used in the command line to change the path of a directory, what is the equivalent cmdlet in PowerShell?

A)Move-Directory
B)Get-Location
C)Set-Location
D)Edit-Directory
Question
How can a PowerShell ISE user include a suggestion from an IntelliSense menu in their script?

A)highlight the suggestion
B)double-click the suggestion
C)press F3
D)press and hold f3
Question
Windows commands within PowerShell are as efficient as using an equivalent PowerShell cmdlet.
Question
What keyboard shortcut will allow you to launch a script directly from the PowerShell ISE?

A)F5
B)F3
C)Ctrl+L
D)Ctrl+S
Question
What command in CentOS 7 can be used in a script to enable multiple executions of a set of instructions while a certain condition exists?

A)for in
B)if
C)while
D)chmod
Question
Before running a script on CentOS 7, what command will you need to modify the scripts permission?

A)chmod
B)chperm
C)cp
D)if
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
A command in CentOS 7 that enables you to execute a group of statements a specified number of times
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
commands that establish a layout for data
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
a technique that minimizes errors by consistently observing typing rules
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
Commands for arranging data based on criteria
Question
CentOS 7 scripts can utilize the if command in two different ways to set up decisions within scripts. The first format is referred to as "if then fi". What is the second format?

A)if else fi
B)if else then
C)if else
D)then fi
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
A feature in PowerShell that indicates the flow of statements in an executed script
Question
PowerShell cmdlet parameters will always be preceded by what character?

A)underscore
B)backtick
C)hyphen
D)slash
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
In the PowerShell ISE, a pane where cmdlets are typed for execution and the script output appears
Question
What command in CentOS 7 can be used in a script to execute a number of instructions based on a maximum count you specify?

A)if
B)for in
C)chmod
D)while
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
In PowerShell, the pane where cmdlets are typed to create scripts
Question
What characters in PowerShell represent a dynamic variable that stores the current information being piped to it?

A)$_.
B)*_
C)#_.
D)$+
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
In PowerShell, the red lines in the Console pane that indicate an error has occurred
Question
What PowerShell ISE keyboard shortcut can be used to run a script immediately?

A)F7
B)F5
C)Ctrl+R
D)Alt+R
Question
What syntax characters in PowerShell indicate optional items?

A)curly braces
B)parenthesis
C)angle brackets
D)brackets
Question
What PowerShell cmdlet will allow you to arrange a table in a particular order?

A)Sort-Data
B)Sort-Table
C)Create-Table
D)Sort-Object
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
A PowerShell technology controlled by the Set-PSDebug cmdlet
Question
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
In PowerShell, a policy in which a digital signature is required for scripts received from an Internet site
Question
If a script is written for use in CentOS 7, how many times should a command line that is executed multiple times be written?

A)only once
B)two times
C)one time per execution
D)three times
Question
What is the default PowerShell execution policy?

A)user policy
B)administrator policy
C)management policy
D)restricted policy
Question
What are three examples of using the concept of clear typing when scripting with PowerShell?
Question
What is the process and advantages of creating scripts using incremental development?
Question
Why is a header line important to include in a script written for CentOS 7 or any other Linux distribution?
Question
What is Microsoft's IntelliSense and how does it benefit a PowerShell ISE user?
Question
Identify and explain the functions of the three PowerShell ISE panes.
Question
Explain the syntax and the capabilities of the Help cmdlet in PowerShell.
Question
Explain the concept of using script parameters in CentOS 7?
Question
What are four ways a PowerShell user can sort and filter data?
Question
Why must a CentOS 7 administrator change the permissions on their script to enable it to run?
Question
Explain how error messages are displayed in PowerShell.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 10: Scripting in Windows 10 and Centos 7
1
What character can you use to break cmdlets between parameters when using PowerShell?

A)ampersand
B)backtick
C)asterisk
D)underscore
B
2
When you write a script, what type of line should you include to ensure that the script is run under the correct shell?

A)header line
B)shell id
C)location line
D)debug line
A
3
When creating and executing scripts in CentOS 7, you must change the permissions on the file before running the new script.
True
4
PowerShell ISE is an Integrated Scripting Environment that is included with Windows 10.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Microsoft's PowerShell Script pane is an "automatic completion" feature that helps you develop scripts quickly.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
What key feature in the PowerShell ISE allows a user to display clickable menus of cmdlets, parameters, parameter values, files, or folders that match the characters you type?

A)Context-sensitive Help
B)Drag and drop
C)Error display
D)IntelliSense
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
What specific configurable PowerShell script runs automatically each time the ISE starts?

A)user
B)profile
C)context
D)preference
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Where does the output appear when you run a script in the PowerShell ISE?

A)Top pane
B)Console pane
C)Command-Add-on pane
D)Scripting pane
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
What PowerShell command written with a trace parameter will enable script tracing?

A)Set-Trace
B)Set-PSDebug
C)Get-PSDebug
D)Get-Trace
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
What PowerShell cmdlet will allow you to Select items to remain in a table after filtering out unwanted items?

A)Filter-Data
B)Where-Object
C)Where-Data
D)Hold-Object
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
What is an alternative to the Help cmdlet when you need to locate a specific cmdlet?

A)Get-Command
B)Help-Command
C)Get-Help
D)Alt-Help
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
When a PowerShell user needs additional help regarding a cmdlet that will create a file, what command syntax can be used to help obtain this information?

A)cmdlet "create file"
B)"create file" Help
C)Help "create file"
D)"create file" cmdlet
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
When using filtering in PowerShell you need to know the comparison operators, what operator allows you to see whether an identical value exists in a list of values?

A)-identical
B)-exist
C)-contains
D)-le
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
To find a cmdlet that obtains process values, use the Get-Command -noun Process command.
Indicate the answer choice that best completes the statement or answers the question.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
In CentOS 7 using an extension on script files is optional. However, some Linux system administrators prefer to add a file extension to their scripts. What file extension is commonly used for this purpose?

A).exe
B).rt
C).bt
D).sh
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
The CD command is used in the command line to change the path of a directory, what is the equivalent cmdlet in PowerShell?

A)Move-Directory
B)Get-Location
C)Set-Location
D)Edit-Directory
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
How can a PowerShell ISE user include a suggestion from an IntelliSense menu in their script?

A)highlight the suggestion
B)double-click the suggestion
C)press F3
D)press and hold f3
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
Windows commands within PowerShell are as efficient as using an equivalent PowerShell cmdlet.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
What keyboard shortcut will allow you to launch a script directly from the PowerShell ISE?

A)F5
B)F3
C)Ctrl+L
D)Ctrl+S
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
What command in CentOS 7 can be used in a script to enable multiple executions of a set of instructions while a certain condition exists?

A)for in
B)if
C)while
D)chmod
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
Before running a script on CentOS 7, what command will you need to modify the scripts permission?

A)chmod
B)chperm
C)cp
D)if
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
A command in CentOS 7 that enables you to execute a group of statements a specified number of times
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
commands that establish a layout for data
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
a technique that minimizes errors by consistently observing typing rules
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
Commands for arranging data based on criteria
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
CentOS 7 scripts can utilize the if command in two different ways to set up decisions within scripts. The first format is referred to as "if then fi". What is the second format?

A)if else fi
B)if else then
C)if else
D)then fi
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
A feature in PowerShell that indicates the flow of statements in an executed script
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
PowerShell cmdlet parameters will always be preceded by what character?

A)underscore
B)backtick
C)hyphen
D)slash
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
In the PowerShell ISE, a pane where cmdlets are typed for execution and the script output appears
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
What command in CentOS 7 can be used in a script to execute a number of instructions based on a maximum count you specify?

A)if
B)for in
C)chmod
D)while
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
In PowerShell, the pane where cmdlets are typed to create scripts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
What characters in PowerShell represent a dynamic variable that stores the current information being piped to it?

A)$_.
B)*_
C)#_.
D)$+
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
In PowerShell, the red lines in the Console pane that indicate an error has occurred
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
What PowerShell ISE keyboard shortcut can be used to run a script immediately?

A)F7
B)F5
C)Ctrl+R
D)Alt+R
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
What syntax characters in PowerShell indicate optional items?

A)curly braces
B)parenthesis
C)angle brackets
D)brackets
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
What PowerShell cmdlet will allow you to arrange a table in a particular order?

A)Sort-Data
B)Sort-Table
C)Create-Table
D)Sort-Object
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
A PowerShell technology controlled by the Set-PSDebug cmdlet
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Match each item with a statement below.
a.clear typing
b.formatting
c.parse error display
d.script-level tracing
e.while
f.sorting
g.tracing
h.Console pane
i.RemoteSigned
j.Script pane
In PowerShell, a policy in which a digital signature is required for scripts received from an Internet site
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
If a script is written for use in CentOS 7, how many times should a command line that is executed multiple times be written?

A)only once
B)two times
C)one time per execution
D)three times
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
What is the default PowerShell execution policy?

A)user policy
B)administrator policy
C)management policy
D)restricted policy
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
What are three examples of using the concept of clear typing when scripting with PowerShell?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
What is the process and advantages of creating scripts using incremental development?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
Why is a header line important to include in a script written for CentOS 7 or any other Linux distribution?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
What is Microsoft's IntelliSense and how does it benefit a PowerShell ISE user?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
Identify and explain the functions of the three PowerShell ISE panes.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
Explain the syntax and the capabilities of the Help cmdlet in PowerShell.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
Explain the concept of using script parameters in CentOS 7?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
What are four ways a PowerShell user can sort and filter data?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
Why must a CentOS 7 administrator change the permissions on their script to enable it to run?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
Explain how error messages are displayed in PowerShell.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.