Bird
0
0

What will be the output of this PowerShell command sequence on Windows 10 if the AD module is not installed?

medium📝 Command Output Q13 of 15
PowerShell - Active Directory
What will be the output of this PowerShell command sequence on Windows 10 if the AD module is not installed?
Import-Module ActiveDirectory -ErrorAction SilentlyContinue; Get-Module ActiveDirectory
AEmpty output, module not loaded
BNo output, module is imported silently
CAn error message about missing module
DList of all installed modules including ActiveDirectory
Step-by-Step Solution
Solution:
  1. Step 1: Understand Import-Module with -ErrorAction SilentlyContinue

    This suppresses errors if the module is missing, so no error message appears.
  2. Step 2: Check Get-Module output when module not loaded

    If the module is not installed and import fails silently, Get-Module returns empty output because the module is not loaded.
  3. Final Answer:

    Empty output, module not loaded -> Option A
  4. Quick Check:

    Missing module + silent import = empty Get-Module output [OK]
Quick Trick: Silent import hides errors; check Get-Module for loaded modules [OK]
Common Mistakes:
  • Expecting error message despite SilentlyContinue
  • Assuming module loads automatically
  • Thinking Get-Module lists all modules installed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes