Bird
0
0

Identify the issue with this PowerShell function name:

medium📝 Debug Q7 of 15
PowerShell - Cmdlets and Pipeline
Identify the issue with this PowerShell function name:
function New-UserAccount { Write-Output 'Creating account' }
AThe verb 'New' is not an approved PowerShell verb
BThere is no issue; the name follows the Verb-Noun convention
CThe noun 'UserAccount' should be lowercase
DThe function name should not contain a hyphen
Step-by-Step Solution
Solution:
  1. Step 1: Check the verb

    'New' is an approved PowerShell verb.
  2. Step 2: Check the noun and format

    The noun 'UserAccount' is correctly capitalized and hyphenated.
  3. Step 3: Confirm naming convention

    The function name follows the Verb-Noun pattern correctly.
  4. Final Answer:

    There is no issue; the name follows the Verb-Noun convention -> Option B
  5. Quick Check:

    Approved verb and proper Verb-Noun format [OK]
Quick Trick: Check approved verbs and hyphen usage [OK]
Common Mistakes:
  • Assuming all verbs are invalid
  • Thinking hyphens are not allowed
  • Believing nouns must be lowercase

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes