Solved

Exchange Management Shell Error

Posted on 2014-10-07
14
129 Views
Last Modified: 2014-10-07
I get the attached image error when I try to running a the following cmdlet:
Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission -User "username" | ft identity, AccessRights

Capture.JPG
I have also run the following cmd to try and overcome this error with no luck:
Get-Item WSMAN:\localhost\Shell\MaxMemoryPershellMB 102400 -force

Any assistance would be great.
0
Comment
Question by:timgreen7077
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
14 Comments
 
LVL 16

Assisted Solution

by:Joshua Grantom
Joshua Grantom earned 250 total points
ID: 40366025
You cannot override the default size but you can change the formatting of your script to achieve the same results. It sends the requests individually to overcome the size limit

$mailboxes = get-mailbox -Resultsize unlimited
foreach($box in $mailboxes){
get-mailboxpermission -user "username" | ft identity,Accessrights
}

Open in new window

0
 

Author Comment

by:timgreen7077
ID: 40366129
I ran the cmdlet you mentioned and get the following. See image:

Capture2.JPG
0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40366146
My fault, -user should be -identity

$mailboxes = get-mailbox -Resultsize unlimited
foreach($box in $mailboxes){
get-mailboxpermission -identity "username" | ft identity,Accessrights
}

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:timgreen7077
ID: 40366219
I tried by entering -identity and it brings up page after page of the user's primary mailbox, but it never brings up any functional mailboxes the user has full manage access to granted via Exchange. When I enter:
get-mailboxpermission -user "username" | ft identity,Accessrights
it would bring up the mailboxes that the user has full manage access to along with his primary mailbox, but when I user
-user in the script you sent it asks for identity.
0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40366229
So what information are you wanting? Who has full access permissions for every mailbox? or all permissions for a single user?
0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40366250
This will give you a list of who has full access permissions for each mailbox
$mailboxes = get-mailbox -Resultsize unlimited
foreach($box in $mailboxes){
Get-MailboxPermission | where { ($_.AccessRights -eq “FullAccess”) | ft identity,User
}

Open in new window

0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40366270
Or if you are wanting to see what mailboxes a single user has full access to,

$mailboxes = get-mailbox -Resultsize unlimited
foreach($box in $mailboxes){
get-mailboxpermission -identity $_. -user "username" | ft identity,Accessrights
}

Open in new window

0
 

Author Comment

by:timgreen7077
ID: 40366301
I'm trying to see what mailboxes a single user has full manage access to. I will try the one you sent and let you know. Thanks for your help and the quick responses.
0
 

Author Comment

by:timgreen7077
ID: 40366317
I get the below error:
Cannot bind argument to parameter 'Identity' because it is null.
    + CategoryInfo          : InvalidData: (:) [Get-MailboxPermission], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MailboxPermission
    + PSComputerName        : houvxhc2.mustangeng.com
0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40366347
Try this, I apologize, I no longer have an exchange environment to test on. We moved to google apps.

$mailboxes = Get-Mailbox -ResultSize Unlimited -properties Identity | Select Identity
foreach ($mailbox in $mailboxes) {
Get-MailboxPermission -identity $_.Identity -User "username" | FT Identity,AccessRights
}

Open in new window

0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40366361
This may work also

$mailboxes = Get-Mailbox -ResultSize Unlimited
foreach ($mailbox in $mailboxes) {
Get-MailboxPermission | where { ($_.User -like “username”) -and ($_.AccessRights -eq “FullAccess”) } | FT Identity,AccessRights
}

Open in new window

0
 
LVL 40

Accepted Solution

by:
footech earned 250 total points
ID: 40366544
Here's a version of Joshua's code with correct syntax.
$mailboxes = Get-Mailbox -ResultSize Unlimited
foreach ($mailbox in $mailboxes)
{ Get-MailboxPermission -Identity $mailbox.Alias -User "username" | ft identity, AccessRights }

Open in new window

0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40366561
thanks footech
0
 

Author Closing Comment

by:timgreen7077
ID: 40366702
Thank you gentlemen. Footech's correction solved the issue.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In-place Upgrading Dirsync to Azure AD Connect
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question