PowerShell - Active DirectoryWhich PowerShell command correctly creates an Organizational Unit named 'HR' under the domain 'corp.local'?ANew-ADUser -Name 'HR' -Path 'DC=corp,DC=local'BNew-ADOrganizationalUnit -Name 'HR' -Path 'DC=corp,DC=local'CNew-ADGroup -Name 'HR' -Path 'DC=corp,DC=local'DNew-ADOrganizationalUnit -Name 'HR'Check Answer
Step-by-Step SolutionSolution:Step 1: Identify Cmdlet for OU CreationNew-ADOrganizationalUnit is used to create OUs.Step 2: Specify Name and PathThe -Name parameter sets the OU name; -Path specifies the domain container.Step 3: Evaluate OptionsNew-ADOrganizationalUnit -Name 'HR' -Path 'DC=corp,DC=local' uses correct cmdlet and parameters; others use wrong cmdlets or omit -Path.Final Answer:New-ADOrganizationalUnit -Name 'HR' -Path 'DC=corp,DC=local' -> Option BQuick Check:New-ADOrganizationalUnit + -Name + -Path [OK]Quick Trick: Use New-ADOrganizationalUnit with -Name and -Path [OK]Common Mistakes:Using New-ADUser or New-ADGroup instead of New-ADOrganizationalUnitOmitting the -Path parameterNot quoting the OU name
Master "Active Directory" in PowerShell9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PowerShell Quizzes Automation Patterns - Configuration drift detection - Quiz 10hard Automation Patterns - Configuration drift detection - Quiz 2easy Cross-Platform PowerShell - Azure PowerShell module - Quiz 14medium Cross-Platform PowerShell - AWS PowerShell module - Quiz 2easy Cross-Platform PowerShell - REST API calls with Invoke-RestMethod - Quiz 11easy Cross-Platform PowerShell - Azure PowerShell module - Quiz 12easy Remote Management - PSSession management - Quiz 10hard Remote Management - Why remote execution scales management - Quiz 5medium Remote Management - Invoke-Command - Quiz 6medium System Administration - Process management (Get/Stop-Process) - Quiz 15hard