Question

Difficulty: EasyBasic Scripting Languages and Constructs

A system administrator is organizing various administrative scripts used across an enterprise network. Match each script file extension to its corresponding default execution environment or interpreter.

  • .ps1Windows PowerShell runtime environment
  • .batWindows Command Prompt (cmd.exe)
  • .vbsWindows Script Host (cscript.exe / wscript.exe)
  • .shLinux/Unix Shell terminal (Bash / Zsh)

Answer

The .ps1 extension matches the Windows PowerShell environment; .bat matches Windows Command Prompt; .vbs matches Windows Script Host; and .sh matches the Linux/Unix Shell terminal.
Each file extension maps directly to its native administrative execution environment: .ps1 relies on PowerShell, .bat uses cmd.exe, .vbs uses Windows Script Host, and .sh uses Unix-based shell environments like Bash or Zsh.

Step-by-Step Solution

1
Identify the scripting language associated with each file extension.
.ps1 corresponds to PowerShell, .bat to Windows Batch, .vbs to VBScript, and .sh to Shell script.
File extensions indicate the language and expected interpreter for execution.
2
Match each script extension to its native execution interpreter.
PowerShell scripts run in PowerShell, Batch files run in cmd.exe, VBScript runs in WSH (cscript/wscript), and Shell scripts run in Linux/macOS command shells.
Operating systems route script execution to specific binary interpreters based on file extensions.

Key Concept

Scripting File Extensions and Execution Environments
Estimated Time:1m 0s
Rate this question