0
0
PowerShellscripting~5 mins

Script modules vs binary modules in PowerShell - Quick Revision & Key Differences

Choose your learning style9 modes available
Recall & Review
beginner
What is a script module in PowerShell?
A script module is a PowerShell file (.psm1) that contains functions, variables, and code written in PowerShell script language. It is easy to create and edit using any text editor.
Click to reveal answer
beginner
What is a binary module in PowerShell?
A binary module is a compiled .NET assembly (.dll) that contains cmdlets and functions written in a .NET language like C#. It runs faster but requires compiling and development tools.
Click to reveal answer
beginner
Which module type is easier to create and modify: script or binary?
Script modules are easier to create and modify because they are plain text files written in PowerShell script. Binary modules require compiling code in a .NET language.
Click to reveal answer
intermediate
Why might you choose a binary module over a script module?
You might choose a binary module for better performance, access to .NET features, or to create complex cmdlets that are hard to write in script.
Click to reveal answer
beginner
How do you import a script module and a binary module in PowerShell?
Use Import-Module with the module name or path for both. PowerShell detects the type automatically and loads the module accordingly.
Click to reveal answer
What file extension does a PowerShell script module usually have?
A.ps1
B.dll
C.exe
D.psm1
Which module type requires compiling code before use?
AScript module
BBinary module
CBoth
DNeither
Which module type is best for quick edits and simple functions?
AScript module
BNeither
CBinary module
DBoth equally
What command imports both script and binary modules in PowerShell?
AAdd-Module
BLoad-Module
CImport-Module
DGet-Module
Why might a developer choose a binary module?
AFor better performance and .NET features
BTo write code faster
CBecause it is easier to edit
DBecause it uses plain text
Explain the main differences between script modules and binary modules in PowerShell.
Think about file types, ease of editing, and performance.
You got /4 concepts.
    When would you choose to use a script module instead of a binary module?
    Consider speed of development and complexity.
    You got /4 concepts.