Multiple choice technology programming languages

Windows PowerShell script files use which of the following file extensions?

  1. .wps

  2. .ps1

  3. .shl

  4. .cmd

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Windows PowerShell scripts use the .ps1 file extension to indicate PowerShell version 1 (and later) scripts. The .wps extension is typically for Writer Documents, .cmd is for classic command shell scripts, and .shl is a non-standard file extension.

AI explanation

To answer this question, you need to have basic knowledge of Windows PowerShell and its file extensions.

Option A) .wps - This option is incorrect because .wps is the file extension for Microsoft Works files, not Windows PowerShell script files.

Option B) .ps1 - This option is correct because .ps1 is the file extension commonly used for Windows PowerShell script files. PowerShell scripts are written in the PowerShell scripting language and have the .ps1 extension.

Option C) .shl - This option is incorrect because .shl is not a recognized file extension for Windows PowerShell script files.

Option D) .cmd - This option is incorrect because .cmd is the file extension for Windows Command Script files, not Windows PowerShell script files.

The correct answer is B) .ps1. This option is correct because .ps1 is the commonly used file extension for Windows PowerShell script files.