Unlock hundreds more features
Save your Quiz to the Dashboard
View and Export Results
Use AI to Create Quizzes and Analyse Results

Sign inSign in with Facebook
Sign inSign in with Google

PowerShell Fundamentals Knowledge Test Challenge

Test Your Basic PowerShell Scripting Skills

Editorial: Review CompletedCreated By: Kayla TapleyUpdated Aug 23, 2025
Difficulty: Moderate
Questions: 20
Learning OutcomesStudy Material
Colorful paper art illustrating a quiz on PowerShell Fundamentals Knowledge Test

Use this PowerShell Fundamentals quiz to practice core cmdlets, scripting basics, and pipeline skills. Work through 15 multiple-choice questions to spot gaps and build confidence. For related practice, try the IT basics quiz or the C# fundamentals quiz .

Which cmdlet lists all available commands in the current PowerShell session?
Get-Alias
Get-Help
Get-Command
Get-Module
undefined
Which parameter displays what a cmdlet would do without making changes?
-WhatIf
-Confirm:$false
-Verbose
-ErrorAction Ignore
undefined
What is the pipeline operator in PowerShell used to pass objects between commands?
=>
>
|
~
undefined
Which cmdlet shows detailed help for a specific cmdlet including examples?
Get-Help -ShowWindow
Get-Command -Detailed
Get-Help -Full
Help -Online
undefined
Which cmdlet reveals the properties and methods of objects flowing through the pipeline?
Get-Member
Select-Object
Format-Table
Out-Host
undefined
Which comparison operator checks for pattern matching using regular expressions?
-match
-like
-eq
-contains
undefined
What does the $_ automatic variable represent inside pipeline script blocks?
The process ID
The current script path
The last error record
The current item in the pipeline
undefined
How do you define a hashtable literal in PowerShell?
@{ Key = 'Value' }
#{Key:Value}
,
[@] Key='Value'
undefined
Which redirection operator sends error output stream (stream 2) to a file?
>>
2>
*>
1>
undefined
Aliases are fully equivalent to functions and can include parameter validation attributes.
False
True
undefined
Which variable controls the default action when a non-terminating error occurs?
$PSModuleAutoLoadingPreference
$LASTEXITCODE
$VerbosePreference
$ErrorActionPreference
undefined
Which feature lets a parameter accept input directly from the pipeline by property name?
[OutputType()]
[ValidateSet()]
[Alias()]
[Parameter(ValueFromPipelineByPropertyName=$true)]
undefined
What is the correct syntax to execute a script in the current scope without creating a new scope?
Invoke-Expression .\MyScript.ps1
Start-Process .\MyScript.ps1
. .\MyScript.ps1
& .\MyScript.ps1
undefined
Select-Object can create calculated properties using hashtables with Name and Expression keys.
False
True
undefined
Export-Csv includes type information by default unless -NoTypeInformation is used (Windows PowerShell behavior).
False
True
undefined
Parameter sets allow mutually exclusive parameter combinations within a single function or cmdlet.
False
True
undefined
Receive-Job -Keep leaves job data available for subsequent receives.
True
False
undefined
The Debug and Verbose message streams are the same and controlled by the same preference variable.
False
True
undefined
PowerShell 7 introduces pipeline chain operators && and || for conditional execution based on success.
True
False
undefined
The S in CIM stands for Scriptable.
False
True
undefined
0

Learning Outcomes

  1. Analyse basic PowerShell cmdlets and their uses
  2. Apply variables and data types in scripts
  3. Demonstrate pipeline operations for data processing
  4. Identify proper use of loops and conditional statements
  5. Evaluate error handling and debugging techniques
  6. Master module management and script execution policies

Cheat Sheet

  1. Master Essential PowerShell Cmdlets - Get-Help shows usage examples and syntax for any cmdlet, while Get-Command lets you explore available commands by verb or noun. Get-Member reveals object properties and methods so you can manipulate data confidently. Together, these cmdlets form the foundation of effective PowerShell scripting.
  2. Understand Variables and Data Types - Use the $ symbol to declare variables and assign values like strings, integers, and arrays to store information. Understanding PowerShell's dynamic typing and explicit type casting prevents common data mishaps. Mastering variables is crucial for building flexible, reusable scripts.
  3. Utilize the Pipeline for Data Processing - The pipeline (|) passes output of one cmdlet directly as input to another, letting you chain commands without creating temporary files. You can filter, sort, and format data on the fly using cmdlets like Where-Object, Sort-Object, and Format-Table. This streamlined approach is at the heart of PowerShell's data processing magic.
  4. Implement Conditional Statements - Use if, elseif, and else blocks to control which sections of your script run based on specific criteria. Conditional logic allows your automation to make decisions - like checking if a service is running or if a file exists - before proceeding. Mastering conditionals means your scripts can react intelligently to different scenarios.
  5. Employ Looping Constructs - Loops such as for, foreach, and while let you perform repetitive tasks without duplicating code. Whether processing every file in a directory or iterating through a list of users, loops automate bulk operations efficiently. Learning which loop fits each scenario speeds up your scripts and keeps them neat.
  6. Handle Errors Gracefully - Encapsulate risky code in try, catch, and finally blocks to capture and respond to exceptions, preventing script failures. You can log errors, retry operations, or clean up resources in a structured way, ensuring reliable automation. Good error handling also makes troubleshooting easier when things go wrong.
  7. Manage Modules Effectively - Import modules with Import-Module to add new cmdlets and features from the PowerShell Gallery or custom scripts. Keeping modules up to date and removing unused ones streamlines your environment and avoids version conflicts. Understanding module scope and autoloading helps you manage dependencies cleanly.
  8. Understand Script Execution Policies - Execution policies like Restricted, RemoteSigned, and Unrestricted govern which scripts can run on your system. By using Get-ExecutionPolicy and Set-ExecutionPolicy, you balance security and flexibility. This knowledge protects your systems from untrusted code while allowing authorized automation.
  9. Explore Object-Oriented Features - PowerShell treats output as objects, letting you access properties and methods directly rather than parsing text. You can create custom objects, define classes, and overload methods to build advanced modules. Embracing these capabilities transforms scripts into modular, self-describing code.
  10. Practice Debugging Techniques - Use Set-PSBreakpoint and Get-PSCallStack to set breakpoints and inspect call stacks, pinpointing errors in real time. Supplement with Write-Debug and Write-Verbose to output diagnostic messages without cluttering normal script output. Regular debugging drills sharpen your ability to find and fix issues swiftly.
Powered by: Quiz Maker