19-D Flashcards
What is the primary purpose of scripting in IT support?
To automate repetitive tasks for greater consistency and to simplify configuration changes
What are the three helpful distinctions in coding languages?
- Shell scripting language
- General-purpose scripting language
- Programming language
What is a shell scripting language?
A language that uses commands specific to an operating system
What distinguishes a general-purpose scripting language?
It uses statements and modules independent of the operating system and is executed by an interpreter
What is the purpose of a shebang line in a shell script?
To designate which interpreter to use
What is the typical file extension for a Linux shell script?
.SH
What is the comment delimiter in Bash scripting?
#
What is a variable in scripting?
A label for a value that can change as the script executes
In Bash, how are positional parameters referred to?
$1, $2, etc.
What is a branch in scripting?
An instruction to execute a different sequence of instructions based on a logical test
What does a ‘For’ loop do in scripting?
Repeats a statement block a predictable number of times
What is the command to restart a host in Bash?
shutdown -r
What is the main purpose of Windows PowerShell?
To combine a script language with prebuilt modules (cmdlets) for managing Windows features
What file extension is used for PowerShell scripts?
.PS1
What is VBScript based on?
Microsoft’s Visual Basic programming language
What is the file extension for a Windows batch file?
.BAT
What are the two major versions of Python?
Version 2 and Version 3
What is the significance of the .PY extension?
It denotes Python script files
What is the command to perform a silent installation of an EXE file in a batch script?
C:\Path\to\installer.exe /S
What command is used to install Windows updates from a batch file?
wusa.exe
True or False: A logical test in scripting resolves to a TRUE or FALSE value.
True
Complete the sentence: A script can be set to run automatically using _______.
Windows Task Scheduler or cron
What command in PowerShell is used to create a new drive mapping?
New-PSDrive
What is the purpose of error handling in scripts?
To anticipate and manage potential errors during execution