Recall & Review
beginner
What is a PowerShell module?
A PowerShell module is a package that contains PowerShell functions, cmdlets, variables, and workflows grouped together to organize and reuse code easily.
Click to reveal answer
beginner
How do you create a basic PowerShell module file?
Create a file with the extension
.psm1 and add your PowerShell functions or scripts inside it.Click to reveal answer
intermediate
What is the purpose of a
.psd1 file in a PowerShell module?The
.psd1 file is a module manifest that describes the module's metadata like version, author, and dependencies.Click to reveal answer
beginner
How do you import a PowerShell module into your session?Use the command
Import-Module ModuleName to load the module and access its functions.Click to reveal answer
intermediate
Where should you place your PowerShell module files for automatic discovery?
Place them in one of the folders listed in the
$env:PSModulePath environment variable, like Documents\PowerShell\Modules.Click to reveal answer
What file extension is used for a PowerShell module script file?
✗ Incorrect
PowerShell module script files use the .psm1 extension to group functions and scripts.
Which command loads a PowerShell module into your current session?
✗ Incorrect
The correct command to load a module is Import-Module.
What is the role of a module manifest (.psd1) file?
✗ Incorrect
The .psd1 file holds metadata like version and author information for the module.
Where can you place your module files for PowerShell to find them automatically?
✗ Incorrect
PowerShell searches for modules in folders listed in the $env:PSModulePath environment variable.
Which file extension is NOT used in PowerShell module creation?
✗ Incorrect
While .ps1 files are scripts, they are not module files. Modules use .psm1 and .psd1 files.
Explain the basic steps to create and use a PowerShell module.
Think about file types, location, and loading.
You got /4 concepts.
Describe the purpose of the $env:PSModulePath environment variable in module creation.
It controls where PowerShell searches for modules.
You got /3 concepts.