troubleshooting Question

Exchange 2010 List Folders in Mailbox Powershell

Avatar of fireguy1125
fireguy1125 asked on
5 Comments1 Solution5509 ViewsLast Modified:
I need to run a query on all mailboxes in my Exchange 2010 environment.  I found one that accomplishes what I need, however it is throwing an error when I run it.

Get-Mailbox -ResultSize Unlimited | Select-Object alias | foreach-object {Get-MailboxFolderStatistics -Identity $_.alias | select-object Identity, ItemsInFolder, FolderSize} | Export-csv c:\MBFolderStats.csv -NoTypeInformation

Produces error:

Pipeline not executed because a pipeline is already executing. Pipelines cannot be executed concurrently.
    + CategoryInfo          : OperationStopped: (Microsoft.Power...tHelperRunspace:ExecutionCmdletHelperRunspace) [], PS
    + FullyQualifiedErrorId : RemotePipelineExecutionFailed

I need help re-writing it as apparently the following is the cause:

This error is caused because the Windows PowerShell remoting feature doesn’t
support more than one pipeline running at the same time. To resolve this
issue, store the output of the cmdlet earlier in the pipeline in a variable,
and then pipe the data stored in the variable to the ForEach cmdlet.

Thanks in advance!

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros