HOTSPOT
A company has an Office 365 tenant. You install the Microsoft Azure Active Directory module for Windows
PowerShell.
An employee leaves the company. The employee’s account is named [email protected].
You need to hard delete the user’s account.
How should you complete the relevant Windows PowerShell commands? To answer, select the appropriate
Windows PowerShell segments from each list in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
Explanation:
https://docs.microsoft.com/en-us/powershell/module/msonline/remove-msoluser?view=azureadps-
1.0
In some cases, you may want to delete a user’s account entirely, bypassing the Azure Active Directory Recycle Bin. This is called a “hard delete.” You can hard delete a specific user as long as you know their UPN. For example, to hard delete the user with the UPN [email protected], you would issue the following command:
Remove-MsolUser –UserPrincipalName [email protected] –Force
I think force is only used for
-Force
Indicates that this cmdlet does not prompt you for confirmation.
https://docs.microsoft.com/en-us/powershell/module/msonline/remove-msoluser?view=azureadps-1.0
Remove a user from the Recycle Bin PowerShell
Remove-MsolUser -UserPrincipalName “[email protected]” -RemoveFromRecycleBin
The previous command removes the user “From the Recycle Bin”, meaning that it needs to already be deleted.
So the correct answer should be:
Remove-MsolUser -userprincipalname [email protected] -Force
Remove-MsolUser -userprincipalname [email protected] -RemoveFromRecycleBin
First command soft deletes the user
Second command hard deletes the user
You can’t combine both because the second command looks for the user in the Recycle Bin
The answer is correct.
https://technet.microsoft.com/en-us/library/dn186233(v=exchg.150).aspx#BKMK_harddeleted
RemoveFromRecycleBin
Indicates that this cmdlet permanently removes a deleted user from the recycle bin. This operation which can be applied only to deleted users. When this operation has been completed, you will not be able to recover the user by using the Restore-MsolUser cmdlet.
Can only be used when user is allready soft deleted so it is the -force