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 9325005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:44:23+00:00 2026-06-19T04:44:23+00:00

I have the sourcedata similar to the following denormalized table DisplayName LogRecordCount LogRecordBytes ———–

  • 0

I have the sourcedata similar to the following denormalized table

DisplayName                  LogRecordCount LogRecordBytes
-----------                  -------------- --------------
Mailbox - Low,                    459          43756
Mailbox - Low,                    1628         185542
Mailbox - Low,                    2575         264474
Mailbox - Low,                     522          48813
Mailbox - Low,                     410         138212
Mailbox - Low,                    1057         200043
Mailbox - Freed                  3866        2170719
Mailbox - Freed                   606         370304
Mailbox - Freed                  4137        1939924
Mailbox - Freed                 3655        1654650

My goal is to write a summary similar to the following

DisplayName                  LogRecordCount  
-----------                  -------------- 
Mailbox - Low,                     6651            
Mailbox - Freed                   12264     

The following code is very close to getting what I need, but the “DisplayName” isn’t appearing. The value of DisplayName is buried in the result of the Group-Object command.

$stats | ? {$_.DigestCategory -eq 'LogBytes'} | group MailboxGuid | %{
    New-Object psobject -Property @{
        MailboxGuid = $_.Name
        LogRecordBytes = ($_.Group | Measure-Object LogRecordBytes -Sum).Sum
        DisplayName   = $_.Group.DisplayName
    }
}| sort-object LogRecordBytes |  ft -a DisplayName, MailboxGuid, LogRecordBytes

Question

What is the proper syntax for DisplayName = $_.Group.DisplayName to display the display name in the results?

  • 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-19T04:44:24+00:00Added an answer on June 19, 2026 at 4:44 am

    Swap out your DisplayName = .. line with the following:

    DisplayName = $_.Group | Select-Object -ExpandProperty DisplayName -Unique
    

    If for some magical reason there are different DisplayName values in the group, you will get an array like {value1, value2}, but normally it will return a single name only 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following sample where the SourceData class would represent a DataView resulting
have 2 questions : A computer with 32-bit address uses 2-level page table (9
I have the following app that has a textview and an edittext. When the
In Oracle I've created a data type: TABLE of VARCHAR2(200) I want to have
I have a case of updating the target table where source columns data not
I have an Excel sheet containing table like data strSQL = SELECT S.FIELD_NAME1,S.FIELD_NAME2,S.FIELD_NAME3 from
I have denormalized data (coming from a file) that needs to be imported into
I am getting following error for the Macro I have created to insert Pivot
When using SSIS to load data from a source table, we have a OLE
I have the following data that I am trying to feed into a Handlebar

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.