Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7932781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:07:16+00:00 2026-06-03T21:07:16+00:00

I am trying a few things in Powershell and what I don’t manage to

  • 0

I am trying a few things in Powershell and what I don’t manage to achieve is the following (in Exchange):

Get-User | Get-MailboxStatistics

But in the output I would like some fields/outputs from the "Get-User" cmdlet and some fields/outputs from the "Get-MailboxStatistics" cmdlet.

If anyone has an answer, I have searched the web but with no success as I’ve had difficulties explaining it in a few words.

Thanks in advance for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:07:18+00:00Added an answer on June 3, 2026 at 9:07 pm

    Start with the execution of one cmdlet, pipe the results to Foreach-Object and then save a reference to the current object ($user), now execute the second command and save it in a variable as well. Create new object with properties from both objects.

    You also need to filter users that have mailboxes, use the RecipientTypeDetails parameter.

    $users = Get-User -RecipientTypeDetails UserMailox 
    $users | Foreach-Object{
    
        $user = $_
        $stats = Get-MailboxStatistics $user
    
        New-Object -TypeName PSObject -Property @{
            FirstName = $user.FirstName
            LastName = $user.LastName
            MailboxSize = $stats.TotalItemSize
            ItemCount =  $stats.ItemCount   
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to find a resource to get a few things about the user
i am trying to work on nsuserdefaults but few things are confusing me in
I am trying out few things on windows with emacs. In my case, I
I am using Git Bash and am trying a few things like making a
I am trying to separate a few things in here. I have a program
So I am trying to do a few things with numbers in Objective C
I am trying to do a few things using DirectShow for audio playback. I
I am trying to clear up a few things in my head about implementing
I am trying to figure out a way to pre-process few things before my
I am new to bash scripting and trying to learn a few things. Here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.