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 17

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


Pete

Pete

C is the answer here.
Although… I tried the command in D and it works as well. Maybe there’s a limit in how many user?

Does anybody know?

SR

SR

Default is all so you dont need it.

-All []
If present, then all results will be returned. Cannot be used with
MaxResults parameter.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

Pels

Pels

answer is D
jst wrote the exam, they removed the C option

Naruc

Naruc

Pels is somehow close to the truth :)))

The question remain the same, answers have changed thou :

A. Get-MsolUser -all | Where-Object {$_.isLicensed -ne “true”}| Remove-MsolUser -Force
B. Get-MsolUser | Where-Object {$_.isLicensed -ne “true”}| Remove-MsolUser -Force
C. Get-MsolUser-EnabledFilter “DisabledOnly” | Remove-MsolUser -Force
D. Get-MsolUser -UnlicensedUsersOnly | Remove-MsolUserForce

Where the answers is not D :)))) is A

https://community.office365.com/en-us/f/148/t/54867
“- all” is used if there are more than 500 users

bielik91

bielik91

Passed today with 857 score. Some new questions appeared:
1. DNS record to support Skype for Business Online Federation
2. Contoso have users in London & New York. When creating tenant company address is in New york. In which Datacenter users will be created? (answers:London, New York, Both)
3. Organization has Exchange 10 that has resource forest separated from account forest. Question was about where DirSync and AADSyns should be installed. Something like that, don’t remember
4. Organization has MFA enabled. User1 is on vacation. What tool should you use first to forward his malbox to User2 (answers: Powershell, Exchange Admin Center, create app password(?),…)
5. How to disable SSO in Powershell? Org uses AD FS.
6. Which admin role can create(?) report?

report type |admin role
———————-
DLP |
Mail Protection |
Mailbox |

Jim

Jim

Hi,

Someone has answers for new questions please ?

ExchGuy

ExchGuy

This is what I believe these are the answers to bielik91’s questions.

1. SRV
Service: _sipfederationtls
Points to: sipfed.online.lync.com
Port: 5061
Protocol: _tcp

2. The users will be created in the USA. This is decided by the location of the company address used to sign up.

3. This is a very complicated question and depends on the exact scenario.

To keep it simple if the user accounts exist in one forest and are linked to mailboxes in another forest you would install DirSync in the user account forest. However you must first extend the schema in the user account forest to support exchange attributes and then populate the mail and proxy address attributes of each user.

If you want to include Exchange Hybrid in this scenario perform the steps outlined for the user account forest and install the Hybrid server in the mailbox forest.

If you want to use ADFS. You would follow the steps outlined for the user account forest and install the ADFS farm in the mailbox forest.

4. Just use powershell or the Exchange Admin Center in office 365 to forward the mail.

5. Set-MsolDomainAuthentication -Authentication Managed -DomainName yourdomain.com

6. global admin handles mbx reports, mail protection reports, and dlp reports. Exchange role is the org management role and compliance management role

password admin role handles mbx reports and mail protection reports

service admin – has no reporting rights.

Ref: https://support.office.com/en-us/article/View-and-download-reports-about-service-usage-in-Office-365-30e5558f-d3c0-4a3b-a0d5-58fc7750c0ad

Jim

Jim

Passed with 900 today, 99% of Q&As were from this lead2pass 148q dump. Slight changes to answer options in the exam, but the right answers remained, read carefully.

anao

anao

how to download this lead2pass 148q dump?

Tijs bouwmans

Tijs bouwmans

I would like to have it too

Anna

Anna

Passed today with 914 score.
Most questions are same plus those bielik91 posted. Easiest exam from Messaging cetification path.

Shaft

Shaft

Hello admin can you upload or send me the the new version of 70-346 with studies cases please?
thanks

Kevin Nyembo

Kevin Nyembo

Finally passed 70-346 exam!!!

The 70-346 exam is separated in 3 sections now. Total 56 questions.

Section 1 — Fabricam Case Study, 8 questions.

Section 2 — 44 normal questions.

Section 3 — 4 Yes/No questions.

Learned all questions from PassLeader 70-346 dumps, and PassLeader has corrected its answers, 100% valid now!

p.s. Here are part of free PassLeader 70-346 dumps: https://doc.co/sFn6M5

Good Luck!!!