Bird
0
0

Which of the following is the correct syntax to import a module named DataTools in PowerShell?

easy📝 Syntax Q3 of 15
PowerShell - Modules and Script Organization
Which of the following is the correct syntax to import a module named DataTools in PowerShell?
AImport-Module DataTools.psm1 -Force
BImport-Module DataTools
CImport-Module -Name DataTools.psm1
DImport-Module /DataTools
Step-by-Step Solution
Solution:
  1. Step 1: Review the basic Import-Module syntax

    The simplest correct syntax is Import-Module followed by the module name.
  2. Step 2: Analyze the options

    Import-Module DataTools.psm1 -Force and Import-Module -Name DataTools.psm1 include .psm1 extension causing search for non-existent module name; Import-Module /DataTools uses invalid slash syntax.
  3. Final Answer:

    Import-Module DataTools -> Option B
  4. Quick Check:

    Basic import syntax = Import-Module ModuleName [OK]
Quick Trick: Import-Module ModuleName is simplest and correct syntax [OK]
Common Mistakes:
  • Using slashes instead of spaces
  • Adding unnecessary parameters when not needed
  • Confusing parameter names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes