Bird
0
0

Which of the following is the correct way to run a PowerShell cmdlet to list files in a folder?

easy📝 Syntax Q12 of 15
PowerShell - System Administration
Which of the following is the correct way to run a PowerShell cmdlet to list files in a folder?
AGet-ChildItem
BList-Files
CShow-Folder
DGetFiles
Step-by-Step Solution
Solution:
  1. Step 1: Recall common PowerShell cmdlets

    PowerShell uses cmdlets like Get-ChildItem to list files and folders.
  2. Step 2: Identify the correct cmdlet

    Get-ChildItem is the standard cmdlet to list directory contents.
  3. Final Answer:

    Get-ChildItem -> Option A
  4. Quick Check:

    List files cmdlet = Get-ChildItem [OK]
Quick Trick: Remember cmdlets use Verb-Noun format [OK]
Common Mistakes:
  • Using non-existent cmdlets like List-Files
  • Confusing cmdlet names with other commands
  • Omitting the dash between verb and noun

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes