Operational Procedures: Identify the basics of scripting Flashcards

CompTIA A+ 220-1102 Exam Criteria

1
Q

What extension should you use for a power shell?

A

You will save the script with a .ps1 extension. A .ps1 file is a text that contains a series of PowerShell commands that can be run from the PowerShell prompt. In this scenario, you are creating a PowerShell script that will use several PowerShell commands to create the Desired State Configuration (DSC) that will optimize the configuration of virtual machines.

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

What script do you use for a Python extension?

A

A file with a .py extension is a script file written in Python, an interpreted object-oriented programming language. It can be created and edited with a text editor but needs a Python interpreter to run the file. A Python script file will not contain PowerShell commands.

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

What extension would you use for Azure resources?

A

A file with a .js extension is a script file written in the JSON file format that is used to configure Azure resources. For example, when creating a custom build or release task with an extension, your extension includes a task.json file for each build or release task, which describes the build or release task. The build system uses it to render configuration options to the user and to know which scripts to execute at build time. A JSON script file will not contain PowerShell commands.

For example, when creating a custom build or release task with an extension, your extension includes a task.json file for each build or release task, which describes the build or release task. The build system uses it to render configuration options to the user and to know which scripts to execute at build time.

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

What does bash language extension use?

A

.sh extension. A file with a .sh extension is a script file written in the Bash language. A Bash script file will not contain PowerShell commands.

Bash can be used to automate software development tasks such as code compilation, debugging source code, change management and software testing. Network engineers use Bash to test, configure and optimize network performance on organizational networks.

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

What is a batch file used for?

A

For the A+ exam, you will also need to be familiar with the .bat extension. A .bat file extension is a plain text file that contains various commands used for repetitive tasks to run a group of scripts one after another. .bat file types are used by many types of software for shutting down processes, running applications, or copying files.

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

Whate are the three common consideration when running a script?

A

Unintentionally introducing malware: Malicious actors have begun using script-based malware attacks that, when executed, will launch attacks on the system without making any changes on the disk. This enables them to bypass the detection mechanism of many security programs. These malware laden scripts can be attached to programs or sent through an email attachment that when downloaded will perform the malicious action. It is critical that whenever downloading a program or attachment that you verify that the source can be trusted.

Inadvertently changing system settings: Whenever a script is run, it can perform a variety of different actions that can change system settings within an application or device. While many scripts are designed to function this way, they can sometimes make changes to a system setting unintentionally causing workflow disruptions or potentially creating vulnerabilities. Whenever running a script, it is important to understand exactly what the script is doing and what systems it is engaging with. If this does happen, you will need to manually examine what settings were changed are reset them to their original state.

Browser or system crashes due to resource mishandling: Whenever executing a script, crashes can occur if the script causes the device or browser to utilize more resources than it has available. These crashes can be resolved by exiting and rebooting the system; however, the script needs to be reexamined to ensure that it is not mishandling the number of resources that the device or program has available. Whenever writing a script, it is important to understand what resources are available and how the script will utilize to ensure that workflow functions as smoothly and efficiently as possible.

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

What does a Basic PowerShell Script do?

A

Windows Powershell can be used to create scripts to automate specific administrative tasks, for example, mapping a shared network drive. Creating scripts can reduce the administrative effort needed to complete repetitive tasks.

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

What does creating a Basic Batch Script File do?

A

The Windows Terminal can be used to create a batch script file with a file extension of *.bat.

These script files can be used to automate tasks and reduce administrative effort.

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

What is a vbs script and the use for it?

A

VBScript was mainly used to give functionality to webpages. It was originally used for client-side scripting in IE. Web developers could write and embed executable VBScript functions in the Hypertext Markup Language (HTML) of a webpage, which controls the presentation of data.

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