HOTSPOT
You have an Office 365 subscription.
The Office 365 organization contains five temporary administrators. The administrators are members of
multiple role groups.
You need to create a script that prevents the temporary administrators from performing administrative tasks
from the Office 365 admin center. The solution must meet the following requirements:
Provide the ability to reestablish administrative access to the temporary administrators within 14 days.
Release the Office 365 licenses assigned to the temporary administrators.
Which cmdlet should you run? To answer, select the appropriate options in the answer area.
Hot Area:
Explanation:
The Set-MsolUserLicense cmdlet can be used to adjust the licenses for a user. This can include adding a new
license, removing a license, updating the license options, or any combination of these actions.
Example:
The following command removes the for enterprises license from the user. This may result in the user’s data
being removed from each service.
Set-MsolUserLicense -UserPrincipalName [email protected] -RemoveLicenses
“contoso:ENTERPRISEPACK”
https://msdn.microsoft.com/en-us/library/azure/dn194094(v=azure.98).aspx
remove-msoluser -username user1, user2, user3,user4,user5 -force
This command removes the users from Azure Active Directory. If the user has any licenses, the cmdlet removes these.
Only Removing the license wont prevent them from performing administrative tasks as it requires.
The Restore-MsolUser cmdlet restores a user that is in the Deleted users view to its original state. Deleted users remain in the Deleted users view for 30 days.
I agree
https://docs.microsoft.com/en-us/powershell/msonline/v1/remove-msoluser
It does what is needed and you can restore. They must be looking for that answer.
Block will not remvoe license
Remove license does not permit login
permit = block
If you remove the user it will block the user and remove the license.
You still have 30 days to restore the user.