Solved

Exchange Management Shell Error

Posted on 2014-10-07
14
121 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
  • 8
  • 5
14 Comments
 
LVL 16

Assisted Solution

by:Joshua Grantom
Joshua Grantom earned 250 total points
Comment Utility
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
Comment Utility
I ran the cmdlet you mentioned and get the following. See image:

Capture2.JPG
0
 
LVL 16

Expert Comment

by:Joshua Grantom
Comment Utility
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
 

Author Comment

by:timgreen7077
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Too many email signature changes to deal with?

Are you constantly being asked to update your organization's email signatures? Do they take up too much of your time? Wouldn't you love to be able to manage all signatures from one central location, easily design them and deploy them quickly to users. Well, you can!

 

Author Comment

by:timgreen7077
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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 39

Accepted Solution

by:
footech earned 250 total points
Comment Utility
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
Comment Utility
thanks footech
0
 

Author Closing Comment

by:timgreen7077
Comment Utility
Thank you gentlemen. Footech's correction solved the issue.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
A procedure for exporting installed hotfix details of remote computers using powershell
In this video we show how to create a Shared Mailbox 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 Recipients >> Sha…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now