0
0
PowerShellscripting~10 mins

AD module installation in PowerShell - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the Active Directory module.

PowerShell
Import-Module [1]
Drag options to blanks, or click blank then click option'
ADirectoryServices
BADModule
CActiveDirectory
DAD
Attempts:
3 left
💡 Hint
Common Mistakes
Using a shortened or incorrect module name like 'AD' or 'ADModule'.
Forgetting to import the module before running AD commands.
2fill in blank
medium

Complete the code to install the RSAT Active Directory module feature on Windows.

PowerShell
Add-WindowsFeature [1]
Drag options to blanks, or click blank then click option'
AActiveDirectoryFeature
BAD-Module
CRSAT-AD-Tools
DRSAT-AD-PowerShell
Attempts:
3 left
💡 Hint
Common Mistakes
Using incomplete or incorrect feature names.
Confusing the tools feature with the PowerShell module feature.
3fill in blank
hard

Fix the error in the command to check if the Active Directory module is installed.

PowerShell
Get-WindowsFeature | Where-Object { $_.Name -eq 'RSAT-AD-PowerShell' [1] $_.Installed }
Drag options to blanks, or click blank then click option'
A-and
B-eq
C-property
D-filter
Attempts:
3 left
💡 Hint
Common Mistakes
Using comparison operators like '-eq' outside of the script block.
Using parameter names like '-filter' inside the script block.
4fill in blank
hard

Fill both blanks to create a command that installs the AD module and then imports it.

PowerShell
Add-WindowsFeature [1]; Import-Module [2]
Drag options to blanks, or click blank then click option'
ARSAT-AD-PowerShell
BActiveDirectory
CRSAT-AD-Tools
DADModule
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the feature name and module name.
Trying to import the feature name instead of the module.
5fill in blank
hard

Fill all three blanks to create a script that installs the AD module, imports it, and verifies installation.

PowerShell
$feature = Get-WindowsFeature [1]; if ($feature.[2]) { Import-Module [3]; Write-Output 'AD module ready' } else { Write-Output 'Module not installed' }
Drag options to blanks, or click blank then click option'
ARSAT-AD-PowerShell
BInstalled
CActiveDirectory
DName
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong property name to check installation status.
Importing the wrong module name.
Not checking the feature before importing.