PowerShell: Windows Scripting Fundamentals
PowerShell: Windows Scripting Fundamentals
Up to 20 questions, shuffled on every run
Welcome to the PowerShell Basics Quiz! This quiz covers fundamental PowerShell concepts, cmdlets, and scripting best practices. Each question is multiple-choice, and you’ll find hints to help you along the way. Good luck!
Answer key and explanations20 questions
The quiz above draws 20 questions at random from these 30, so a second attempt will not be the same run. Everything in the pool is listed here.
What is the standard Verb-Noun naming convention in PowerShell?
Answer`Verb-Noun`
How do you define a variable in PowerShell?
Answer`$Name = "Value"`
What is the primary difference between the Bash pipe and the PowerShell pipe?
AnswerBash passes text strings, while PowerShell passes .NET Objects
Which cmdlet is used to filter objects based on specific criteria?
Answer`Where-Object`
What does the automatic variable "$_" represent?
AnswerThe current object being processed in the pipeline
Which comparison operator is used for "Not Equal"?
Answer`-ne`
What is the purpose of the "Get-Member" cmdlet?
AnswerTo see the properties and methods available for an object
How do you check the execution policy of your system?
Answer`Get-ExecutionPolicy`
What does the "RemoteSigned" execution policy mean?
AnswerAllows local scripts to run while requiring signatures for downloaded files
What is a Hash Table in PowerShell?
AnswerA data structure used to store unique keys and values
How do you bypass a confirmation prompt when running a risky command?
Answer`-Force`
Which cmdlet is used to output text to the console with color options?
Answer`Write-Host`
What is "Splatting"?
AnswerBundles command parameters into a single variable for easier execution
What is the purpose of the "Get-Help" cmdlet?
AnswerTo display documentation and examples for PowerShell commands
Which symbol is used for comments in PowerShell?
Answer`#`
What happens when you use the "Export-Csv" cmdlet?
AnswerIt saves PowerShell objects into a Comma Separated Values file
How do you specify a data type for a variable (e.g., an Integer)?
Answer`[int]$Number = 5`
What does the "Test-Path" cmdlet do?
AnswerIt checks if a file or folder exists at a specific location
Which cmdlet is used to download content from the web?
Answer`Invoke-WebRequest`
What is the "Pipeline" symbol in PowerShell?
Answer`|`
What is a "Script Block" in PowerShell?
AnswerA collection of statements that acts as a single functional unit
What is the purpose of the "-WhatIf" parameter?
AnswerTo describe what a command would do without actually performing it
Which cmdlet is used to restart a computer?
Answer`Restart-Computer`
How do you create a new empty file in PowerShell?
Answer`New-Item -Path "filename.txt" -ItemType File`
What does the cmdlet "Get-Process" return?
AnswerObjects representing the programs currently running on the system
How do you access the first item in an array named $List?
Answer`$List[0]`
What is "PowerShell Core"?
AnswerThe cross-platform version of PowerShell built on .NET Core
Which cmdlet is used to rename a file?
Answer`Rename-Item`
What does "Invoke-Expression" do?
AnswerIt evaluates and runs a string as a PowerShell command
Which cmdlet is used to find the version of PowerShell?
Answer`$PSVersionTable`








