• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 120
  • Last Modified:

O365 powershell help

Hi all,

Can someone please provide me a command/script for O365 powershell which can provide me with the following:

1. Getting a list of all mailboxes which has E3 license only and show if LitigationHold is enabled or disabled for them.

many thanks.
  • 2
1 Solution
Kash2nd Line EngineerCommented:
don't know the exact command but this article will guide you in the right direction >>> http://windowsitpro.com/office-365/office-365-licensing-windows-powershell
Vasil Michev (MVP)Commented:
This should do the trick:

Get-MsolUser -all | ? {$_.Licenses.AccountSkuId -match "XXX:ENTERPRISEPACK" -and $_.CloudExchangeRecipientDisplayType -eq "1073741824"} | % {Get-Mailbox $_.UserPrincipalName} | select Name,Alias,LitigationHoldEnabled

Open in new window

It will get a list of all the users that have E3 license assigned and have a user mailbox in EO. Just replace the SKU with the corresponding tenant name
iNc0gAuthor Commented:
DAMN!  That worked perfectly !   I wouldn't have been able to come up with this even if I searched and read the net for weeks...     how did you find all the needed parameters that needed to be used ?

Thank you so much !!
iNc0gAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now