Link to home
Start Free TrialLog in
Avatar of Jean-Jacques CELMA
Jean-Jacques CELMAFlag for France

asked on

GET-MAILBOXPERMISSION : display the location usage

Hi Everyone,

I am trying to display the location usageUser generated image
with this script
Get-Mailbox | Get-MailboxPermission | Where-Object { ($_.IsInherited -eq $False) -and -not ($_.User -like "NT AUTHORITY\SELF") -and -not ($_.User -like "S-1*") -and ($_.identity -like "Baby*")} | Select-Object user,identity,office

It does not show up.

Any clues?

Thks
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

That property is not exposed via Get-MailboxPermission, so you cannot leverage it directly. Also, it's not the same thing as the "Office" property.

Use the following examples:
Select user,Identity,@{n="UsageLocation";e={(Get-Mailbox $_.User).UsageLocation}}

Open in new window


or

Select user,Identity,@{n="Office";e={(Get-User $_.User).Office}}

Open in new window

Hi,
you can obtain directly the information with msol environment :

get-msoluser -all | ft userprincipalname,usagelocation

Open in new window

Or, if you combine the Powershell environment "Exchange" and "Msol":

get-mailbox UserName | get-msoluser | ft userprincipalname,usagelocation

Open in new window


Avatar of Jean-Jacques CELMA

ASKER

I am seeing have useful information on the sharedmailbox from contact information on Office365 CloudUser generated imageAny clues how i can get with the script ?
Thks
ASKER CERTIFIED SOLUTION
Avatar of DEMAN-BARCELO (MVP) Thierry
DEMAN-BARCELO (MVP) Thierry
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial