exam questions

Exam 70-346 All Questions

View all questions & answers for the 70-346 exam

Exam 70-346 topic 3 question 21 discussion

Actual exam question from Microsoft's 70-346
Question #: 21
Topic #: 3
[All 70-346 Questions]

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
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Step 1: Get all unlicensed users:
The Get-MsolUser cmdlet can be used to retrieve an individual user, or list of users. We must use both the All and the UnlicensedUsersOnlyparameters to retrieve all unlicensed users. Without the -All option, only 500 results would be returned.
Parameters include:
✑ All [<SwitchParameter>] If present, then all results will be returned.
✑ UnlicensedUsersOnly [<SwitchParameter>] The filter for only users who are not assigned a license.
Step 2: Remove these users through the Remove-MsolUser Force command.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Currently there are no comments in this discussion, be the first to comment!
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...