Which Windows PowerShell command should you run?

A company migrates to Office 365. 2,000 active users have valid Office 365 licenses assigned.
An additional 5,000 user accounts were created during the migration and testing processes. These users
do not have any licenses assigned.
You need to remove the Office 365 user accounts that do not have any licenses assigned by using the
least amount of administrative effort.
Which Windows PowerShell command should you run?

A company migrates to Office 365. 2,000 active users have valid Office 365 licenses assigned.
An additional 5,000 user accounts were created during the migration and testing processes. These users
do not have any licenses assigned.
You need to remove the Office 365 user accounts that do not have any licenses assigned by using the
least amount of administrative effort.
Which Windows PowerShell command should you run?

A.
Get-MsolUser -All -EnabledFilter “DisabledOnly” | Remove-MsolUser -Force

B.
Get-MsolUser-EnabledFilter “DisabledOnly” | Remove-MsolUser -Force

C.
Get-MsolUser -All -UnlicensedUsersOnly | Remove-MsolUser -Force

D.
Get-MsolUser -UnlicensedUsersOnly | Remove-MsolUser–Force

Explanation:
http://technet.microsoft.com/en-us/library/dn194133.aspx



Leave a Reply 4

Your email address will not be published. Required fields are marked *


mayo

mayo

Answer: C
Get-MsolUser -All -UnlicensedUsersOnly | Remove-MsolUser -Force

-All is required because the default number of lines is 500.

jreach

jreach

I ran the PS cmdlet on my test lab and it works. Answer is correct.