Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to install a module from the PowerShell Gallery.
PowerShell
Install-Module -Name [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a cmdlet name instead of a module name.
Leaving the module name blank.
✗ Incorrect
The Install-Module cmdlet installs modules from the PowerShell Gallery. 'AzureAD' is a valid module name.
2fill in blank
mediumComplete the code to find modules related to 'Azure' in the PowerShell Gallery.
PowerShell
Find-Module -Name [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Searching for exact module names only.
Not using quotes around the search pattern.
✗ Incorrect
Using wildcards like '*Azure*' searches for all modules with 'Azure' in their name.
3fill in blank
hardFix the error in the code to update a module from the PowerShell Gallery.
PowerShell
Update-Module -Name [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using cmdlet names instead of module names.
Trying to update modules not installed.
✗ Incorrect
Update-Module requires a valid module name installed on your system, like 'AzureAD'.
4fill in blank
hardFill both blanks to save a module to a specific path and then import it.
PowerShell
Save-Module -Name [1] -Path [2] Import-Module -Name [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using cmdlet names instead of module names.
Using invalid or missing folder paths.
✗ Incorrect
Save-Module saves 'AzureAD' to 'C:\Modules'. Then Import-Module loads it from the saved location.
5fill in blank
hardFill all three blanks to create a script that installs a module if not already installed.
PowerShell
if (-not (Get-Module -ListAvailable -Name [1])) { [2] -Name [1] -Force } Import-Module -Name [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using different module names for check and import.
Using Update-Module instead of Install-Module for installation.
✗ Incorrect
The script checks if 'AzureAD' is installed, installs it if missing, then imports 'AzureAD'.