SG: Ch 21: Scripting and Remote Access Flashcards

1
Q

Which Microsoft remote protocol allows for local drives to be presented to the remote system?

A. VCN

B. RDP

C. SSH

D. Telnet

A

B. RDP

Remote Desktop Protocol (RDP) allows for local drives to be available to the remote machine when an RDP session is initiated. Neither Virtual Network Computing (VNC), nor Secure Shell (SSH), nor Telnet is capable of redirecting drives.

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

Which environment variable is not inherited?

A. System variable

B. User variable

C. Program variable

D. String variable

A

C. Program variable

A program variable is the least significant and not inherited. A system variable is defined for the entire system and is the most significant because it is inherited by all users and programs. A user variable is significant as well, since all applications will inherit the variable. A string variable is not inherited, but it is not an environment variable.

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

Which statement about scripting languages is true?

A. Scripting languages require a compiler.

B. Scripting languages are strongly typed.

C. Scripting languages are interpreted.

D. Scripting languages have good memory management.

A

C. Scripting languages are interpreted.

Scripting languages are interpreted languages that run on top of a runtime environment. Programming languages, not scripting languages, require a compiler. Scripting languages are not strongly typed; programming languages are strongly typed. Scripting languages have bad memory management because of loosely typed variables.

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

Which scripting language has its own preinstalled Integrated Scripting Environment (ISE)?

A. VBScript

B. Bash

C. Python

D. PowerShell

A

D. PowerShell

PowerShell is the only scripting language that has a preinstalled Integrated Scripting Environment (ISE), called the PowerShell ISE. The VBScript language requires the installation of Microsoft Visual Studio Code. The Bash scripting language requires a text editor or other package be installed. The Python scripting language requires a third-party integrated development environment (IDE), also known as an ISE.

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

Which scripting language is used within web pages to allow for interactive content?

A. PowerShell

B. Bash

C. Windows batch script

D. JavaScript

A

D. JavaScript

JavaScript is primarily web browser–based and allows for interactive content. The PowerShell scripting language is used to manage the operating system. The Bash scripting language is primarily used with Linux and UNIX systems. Windows batch scripts use existing applications and are used to manage the operating system.

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

Which extension is used with the Bash scripting language?

A. .vbs

B. .sh

C. .bat

D. .py

A

B. .sh

The .sh extension is used with the Bash scripting language. The .vbs extension is used with VBScript language. The .bat extension is used with the Windows batch scripting language. The .py extension is used with the Python scripting language.

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

Which scripting language allows for the use of the Component Object Model (COM)?

A. PowerShell

B. VBScript

C. Windows batch script

D. JavaScript

A

B. VBScript

The VBScript language allows for the use of the Component Object Model (COM). The PowerShell scripting language allows for the use of the .NET Framework. Windows batch scripts use existing applications. JavaScript is primarily web browser–based and does not allow for the use of external objects.

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

Which extension is used with the JavaScript scripting language?

A. .js

B. .sh

C. .bat

D. .py

A

A. .js

The .js extension is used with the JavaScript scripting language. The .sh extension used with the Bash scripting language. The .batextension is used with the Windows batch scripting language. The .py is used with the Python scripting language.

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

Which extension is used with the Python scripting language?

A. .vbs

B. .js

C. .bat

D. .py

A

D. .py

The .py extension is used with the Python scripting language. The .vbs extension is used with VBScript language. The .js extension is used with the JavaScript scripting language. The .bat extension is used with the Windows batch scripting language.

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

What level are scripting languages considered?

A. High

B. Mid

C. Intermediate

D. Low

A

A. High

Scripting languages are considered high-level languages because they do not directly access hardware and use an intermediary called the interpreter. Mid-level languages are Java and C/C + + , not scripting languages. There is no such thing as an intermediate-level language. Low-level languages are machine language and assembly language, which are not scripting languages.

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

Which protocol has poor security?

A. RDP

B. Quick Assist

C. SSH

D. Telnet

A

D. Telnet

The Telnet protocol is quite aged and has poor security since it transmits everything in cleartext. RDP uses TLS security and is quite secure. The Quick Assist utility also uses TLS security. The SSH protocol provides strong encryption and a built-in, certificate-based authentication mechanism.

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

Which type of variable will allow decimal math?

A. Boolean

B. Integer

C. Floating-point

D. String

A

C. Floating-point

Floating-point variables allow for precision math, also known as decimal math. Boolean variables allow for true or false values. Integer variables allow for whole numbers values. String variables allow for text values.

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

Which line would be used to comment JavaScript code?

A. //comment

B. ‘comment

C. REM comment

D. # comment

A

A. //comment

The line of //comment is used to comment JavaScript code. The line of ‘comment is used to comment VBScript code. The line of REM comment is used to comment Windows batch script code. The line of # comment is used to comment Bash script code and PowerShell code.

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

What must be done before a Bash script can be executed?

A. chown permissions must be set.

B. The execute attribute must be set.

C. chmod permissions must be set.

D. An .sh must be added to the end of the script.

A

C. chmod permissions must be set.

Before a script can be executed, you must use the chmod command to grant execute permissions. The chown command changes ownership. There is no such thing as an execute attribute. Adding .sh to the end of the script doesn’t serve any purpose.

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

Which extension is used with the Windows batch scripting language?

A. .vbs

B. .js

C. .bat

D. .py

A

C. .bat

The .bat extension is used with the Windows batch scripting language. The .vbs extension is used with VBScript language. The .js extension is used with the JavaScript scripting language. The .py extension is used with the Python scripting language.

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

Which scripting language is used with Microsoft Azure and Office 365?

A. PowerShell

B. VBScript

C. Windows batch script

D. JavaScript

A

A. PowerShell

The PowerShell scripting language allows for the use of the .NET Framework and is commonly used with Microsoft Azure and Office 365. The VBScript language allows for the use of the Component Object Model (COM) and is not used for cloud services. Windows batch script uses existing applications and is not used for cloud services. JavaScript is primarily web browser–based, does not allow for the use of external objects, and is not used for cloud services.

17
Q

On which network protocol and port does SSH operate?

A. TCP port 3389

B. TCP port 22

C. TCP port 23

D. TCP port 443

A

B. TCP port 22

The SSH protocol operates on TCP port 22. The Remote Desktop Protocol operates on TCP port 3389. The Telnet service operates on TCP port 23. HTTPS operates on TCP port 443.

18
Q

Which statement will load a PowerShell variable xvar with a value of 2?

A. xvar = 2

B. $xvar = 2

C. xvar = 2;

D. set /a xvar = 2

A

B. $xvar = 2

The statement $xvar = 2 is a PowerShell statement that will load the variable xvar with a value of 2. The statement xvar = 2 is Bash syntax. The statement xvar = 2; is JavaScript syntax. The statement set /a xvar = 2 is Windows batch script syntax.

19
Q

Which type of loop has a defined beginning and end, and steps from beginning to end?

A. do while loop

B. while loop

C. if statement

D. for loop

A

D. for loop

A for loop has a defined beginning and end, and steps from the beginning to the end. A do while loop is a type of while loop and has only a defined end. A while loop has only a defined end. An if statement is branch logic, not a loop.

20
Q

Which statement will load a JavaScript variable mvar with a value of 8?

A. $mvar = 8

B. mvar = 8

C. mvar = 8;

D. set /a mvar = 8

A

C. mvar = 8;

The statement mvar = 8; is JavaScript syntax to load a variable of mvar with a value of 8. The statement $mvar = 8 is PowerShell syntax. The statement mvar = 8 is Bash syntax. The statement set /a mvar = 8 Windows batch script syntax.