0
0
PowerShellscripting~10 mins

Group management 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 create a new local group named 'Developers'.

PowerShell
New-LocalGroup -Name [1]
Drag options to blanks, or click blank then click option'
ADevelopers
BAdmins
CUsers
DGuests
Attempts:
3 left
💡 Hint
Common Mistakes
Using an existing group name instead of 'Developers'.
Omitting the -Name parameter.
2fill in blank
medium

Complete 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'
AAdmin
BCharlie
CBob
DAlice
Attempts:
3 left
💡 Hint
Common Mistakes
Adding the wrong user.
Forgetting to specify the -Member parameter.
3fill in blank
hard

Fix 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'
ABob
BAlice
CAdmins
DDevelopers
Attempts:
3 left
💡 Hint
Common Mistakes
Using the group name instead of the member name.
Removing a user not in the group.
4fill in blank
hard

Fill 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'
A'Developers'
BName
CMembers
D'Users'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong group name.
Selecting a property that does not exist.
5fill in blank
hard

Fill 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'
ATesters
BDevelopers
CEve
DAdmins
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing group names between commands.
Adding wrong user to the group.