Bird
0
0

You want to create a function that stops a service and logs the action. Which is the best Verb-Noun name following PowerShell conventions?

hard📝 Application Q8 of 15
PowerShell - Cmdlets and Pipeline
You want to create a function that stops a service and logs the action. Which is the best Verb-Noun name following PowerShell conventions?
AStop-ServiceLogAction
BServiceLog-Stop
CStop-ServiceLog
DStopServiceLogAction
Step-by-Step Solution
Solution:
  1. Step 1: Identify the main action and object

    The main action is 'Stop' and the object is 'ServiceLog' (service log).
  2. Step 2: Choose the name that follows Verb-Noun with clear object

    Stop-ServiceLog uses 'Stop-ServiceLog' which is concise and follows the convention.
  3. Final Answer:

    Stop-ServiceLog -> Option C
  4. Quick Check:

    Clear Verb-Noun with concise noun = B [OK]
Quick Trick: Keep noun concise and clear after verb [OK]
Common Mistakes:
  • Making noun too long or complex
  • Combining words without hyphen
  • Using multiple verbs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes