Bird
0
0

You run the command:

medium📝 Debug Q6 of 15
PowerShell - Basics and Environment
You run the command:
Get-Command -Nam 'Get-Item'

and receive an error. What is the most likely cause?
AThe command requires administrative privileges to run.
BThe command 'Get-Item' does not exist in PowerShell.
CYou need to specify the module parameter to find 'Get-Item'.
DThe parameter name '-Nam' is misspelled and should be '-Name'.
Step-by-Step Solution
Solution:
  1. Step 1: Check the command syntax

    The parameter '-Nam' is incorrect; the correct parameter is '-Name'. PowerShell parameters must be spelled correctly.
  2. Step 2: Verify command existence

    'Get-Item' is a valid cmdlet, so The command 'Get-Item' does not exist in PowerShell. is incorrect.
  3. Step 3: Consider module and privileges

    Neither specifying a module nor admin rights are required to run 'Get-Item'.
  4. Final Answer:

    The parameter name '-Nam' is misspelled and should be '-Name'. -> Option D
  5. Quick Check:

    Parameter names must be exact [OK]
Quick Trick: Check parameter spelling carefully [OK]
Common Mistakes:
  • Assuming command doesn't exist
  • Forgetting to spell parameters correctly
  • Thinking module must be specified

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes