Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a new organizational unit named 'Sales' in Active Directory.
PowerShell
New-ADOrganizationalUnit -Name [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put the name in quotes.
Using an incorrect parameter name.
✗ Incorrect
The command creates a new organizational unit named 'Sales' using the -Name parameter.
2fill in blank
mediumComplete the code to move the organizational unit 'Sales' to the path 'OU=Departments,DC=example,DC=com'.
PowerShell
Move-ADObject -Identity 'OU=Sales,DC=example,DC=com' -TargetPath [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong distinguished name for the target path.
Omitting quotes around the path.
✗ Incorrect
The -TargetPath parameter specifies the new location for the organizational unit.
3fill in blank
hardFix the error in the code to delete the organizational unit 'Sales' including all child objects.
PowerShell
Remove-ADOrganizationalUnit -Identity [1] -Recursive Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using only the OU name without the full path.
Forgetting the -Recursive switch when child objects exist.
✗ Incorrect
The -Identity parameter requires the full distinguished name to correctly identify the OU to delete.
4fill in blank
hardFill both blanks to get all organizational units under 'OU=Departments,DC=example,DC=com' and select their names.
PowerShell
Get-ADOrganizationalUnit -Filter * -SearchBase [1] | Select-Object [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong distinguished name in -SearchBase.
Selecting a property that does not exist or is not useful.
✗ Incorrect
The -SearchBase limits the search to the specified OU, and Select-Object chooses the 'Name' property to display.
5fill in blank
hardFill all three blanks to create a new OU named 'HR' in 'OU=Departments,DC=example,DC=com' and set a description.
PowerShell
New-ADOrganizationalUnit -Name [1] -Path [2] -Description [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the description text.
Using the wrong path for the -Path parameter.
✗ Incorrect
The -Name sets the OU name, -Path sets where to create it, and -Description adds a description.