0
0
PowerShellscripting~20 mins

AD module installation in PowerShell - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
AD Module Installation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
What is the output of importing the Active Directory module?
You run the command Import-Module ActiveDirectory in PowerShell on a Windows Server with the AD module installed. What is the expected output?
PowerShell
Import-Module ActiveDirectory
ANo output and no error
BWarning: Module is deprecated
CList of all AD cmdlets displayed
DError: Module 'ActiveDirectory' not found
Attempts:
2 left
💡 Hint
Importing a module usually does not show output unless there is an error.
💻 Command Output
intermediate
1:30remaining
What happens if you try to install the AD module on Windows 10 using PowerShell?
You run Install-WindowsFeature RSAT-AD-PowerShell on Windows 10. What is the expected result?
PowerShell
Install-WindowsFeature RSAT-AD-PowerShell
AWarning: Feature already installed
BAD module installs successfully
CError: Install-WindowsFeature is not recognized
DPrompt to restart computer
Attempts:
2 left
💡 Hint
Install-WindowsFeature is a Server-specific cmdlet.
📝 Syntax
advanced
2:00remaining
Which command correctly installs the AD module on Windows Server 2022?
Select the correct PowerShell command to install the Active Directory module on Windows Server 2022.
AEnable-WindowsOptionalFeature -Online -FeatureName RSAT-AD-PowerShell
BInstall-WindowsFeature -Name RSAT-AD-PowerShell
CAdd-WindowsCapability -Online -Name RSAT-AD-PowerShell
DInstall-Module -Name ActiveDirectory
Attempts:
2 left
💡 Hint
On Windows Server, the cmdlet to install roles and features is Install-WindowsFeature.
🔧 Debug
advanced
2:00remaining
Why does this command fail to import the AD module?
You run Import-Module ActiveDirectory but get the error: ModuleNotFoundException: Module 'ActiveDirectory' not found. What is the most likely cause?
PowerShell
Import-Module ActiveDirectory
AYou need to run PowerShell as administrator
BThe PowerShell version is too new and incompatible
CThe module name is case sensitive and should be 'activedirectory'
DThe Active Directory module is not installed on this machine
Attempts:
2 left
💡 Hint
Check if the module is installed before importing.
🚀 Application
expert
2:30remaining
How to verify if the AD module is installed and available in PowerShell?
You want to check if the Active Directory module is installed and ready to use in your PowerShell session. Which command will give you a list of available modules including AD?
AGet-Module -ListAvailable | Where-Object { $_.Name -eq 'ActiveDirectory' }
BGet-InstalledModule -Name ActiveDirectory
CFind-Module -Name ActiveDirectory
DGet-Command -Module ActiveDirectory
Attempts:
2 left
💡 Hint
You want to see modules installed on your system, not just imported.