Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a new local group named 'Developers'.
PowerShell
New-LocalGroup -Name [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using an existing group name instead of 'Developers'.
Omitting the -Name parameter.
✗ Incorrect
The command 'New-LocalGroup -Name Developers' creates a new local group called 'Developers'.
2fill in blank
mediumComplete the code to add the user 'Alice' to the group 'Developers'.
PowerShell
Add-LocalGroupMember -Group 'Developers' -Member [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Adding the wrong user.
Forgetting to specify the -Member parameter.
✗ Incorrect
The command adds the user 'Alice' to the 'Developers' group using the -Member parameter.
3fill in blank
hardFix the error in the code to remove the user 'Alice' from the group 'Developers'.
PowerShell
Remove-LocalGroupMember -Group 'Developers' -Member [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the group name instead of the member name.
Removing a user not in the group.
✗ Incorrect
To remove 'Alice' from the group, the -Member parameter must be set to 'Alice'.
4fill in blank
hardFill both blanks to list all members of the group 'Developers' and select only their names.
PowerShell
Get-LocalGroupMember -Group [1] | Select-Object [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong group name.
Selecting a property that does not exist.
✗ Incorrect
The command gets members of 'Developers' and selects their 'Name' property.
5fill in blank
hardFill all three blanks to create a new group 'Testers', add user 'Eve' to it, and then list the members.
PowerShell
New-LocalGroup -Name [1] Add-LocalGroupMember -Group [2] -Member [3] Get-LocalGroupMember -Group [2] | Select-Object Name
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing group names between commands.
Adding wrong user to the group.
✗ Incorrect
The code creates 'Testers' group, adds 'Eve' to it, then lists members of 'Testers'.