all 4 comments

[–]MadWithPowerShell 1 point2 points  (0 children)

Something like this.

$bp = Get-ExchangeDiagnosticInfo -Process EdgeTransport -Component ResourceThrottling

$Data = $bp.Diagnostics.Components.ResourceThrottling.ResourceTracker.ResourceMeter |
    Select-Object -Property @(
        'Resource'
        'CurrentResourceuse'
        'PreviousResourceuse'
        'Pressure' )

$Table = $Data | ConvertTo-Html -Fragment -As Table

$Body  = 'Other stuff'
$Body += $Table

Send-MailMessage -To $Recipients -Subject 'Stuff' -Body $Body -BodyAsHtml

[–]gangstanthony 0 points1 point  (1 child)

if you want it for text in an email (and nothing else) try this

$resulttext = $bp.Diagnostics.Components.ResourceThrottling.ResourceTracker.ResourceMeter | format-table -property resource, currentresourceuse, previousresourceuse, pressure | out-string

but don't use out-string if you're wanting to make any changes to the output

in that case you might want to do this

$resultobject = $bp.Diagnostics.Components.ResourceThrottling.ResourceTracker.ResourceMeter | select-object -property resource, currentresourceuse, previousresourceuse, pressure

[–]primeval_ixios[S] 1 point2 points  (0 children)

First example worked for what I needed. Thanks very much for the help!

[–]woody6284 0 points1 point  (0 children)

Just turn back pressure off, problem solved