Share via

Exchange 2019 onprem: rights problems with Get-ExchangeDiagnosticInfo

TRÖSTER Joachim 6 Reputation points
2023-06-02T09:07:55.2966667+00:00
According to MS we need to use Get-ExchangeDiagnosticInfo to check Back Pressure. I want to automate that with a script running in task scheduler.
Understanding back pressure | Microsoft Learn

The user must have one of these roles:

Get-ManagementRole -Cmdlet Get-ExchangeDiagnosticInfo
Name                    RoleType
----                    --------
Support Diagnostics     SupportDiagnostics
View-Only Configuration ViewOnlyConfiguration
O365SupportViewConfig   O365SupportViewConfig

The User is in "View-Only Configuration" and for testing i made a new admin roll copying "View-Only Organization Management" and add "Support Diagnostics" to this new admin role.

When I use a user in "Organization Management" to check for back pressure, all is fine. But a user only in the roles I mentioned gets an error:

[xml]$bp=Get-ExchangeDiagnosticInfo -Server testserver -Process EdgeTransport -Component ResourceThrottling; $bp.Diagnostics.Components.ResourceThrottling.ResourceTracker.ResourceMeter 

The output is empty.
I checked the details:

PS C:\it\scripts\Exchange> $bp
Diagnostics
-----------
Diagnostics

So, we have some values. Lets go deeper:

PS C:\it\scripts\Exchange> $bp.Diagnostics | ft -wrap

error                            action                     message
-----                            ------                     -------
ProcessAccessManager RPC Error 5 Query registered processes Error 0x5 (Access is denied) from RunProcessCommand
                                                            EEInfo: ComputerName:
                                                            EEInfo: ProcessID: 14004
                                                            EEInfo: Generation Time: 6/2/2023 8:03:12 AM
                                                            EEInfo: Generating component: 2
                                                            EEInfo: Status: 0x00000005
                                                            EEInfo: Detection location: 1750
                                                            EEInfo: Flags: 0
                                                            EEInfo: NumberOfParameters: 1
                                                            EEInfo: prm[0]: Long: 5 (0x00000005)


I run the command on a member server with installed Exchange Shell, not directly on an Exchange server. That worked so far without any problems. The RPC error seems to point to a problem with this method, but an admin user can run the command the same way with no errors and output (example below). So what rights is my user missing to run it?

Resource            : PrivateBytes
CurrentResourceUse  : Low
PreviousResourceUse : Low
PressureTransitions : [PressureTransitions: MediumToHigh=75 HighToMedium=73 LowToMedium=72 MediumToLow=71]
Pressure            : 0

Resource            : SystemMemory
CurrentResourceUse  : Low
PreviousResourceUse : Low
PressureTransitions : [PressureTransitions: MediumToHigh=94 HighToMedium=89 LowToMedium=88 MediumToLow=84]
Pressure            : 42

Resource            : UsedVersionBuckets[C:\Program Files\Microsoft\Exchange
                      Server\V15\TransportRoles\data\Queue\mail.que]
CurrentResourceUse  : Low
PreviousResourceUse : Low
PressureTransitions : [PressureTransitions: MediumToHigh=1500 HighToMedium=1000 LowToMedium=999 MediumToLow=800]
Pressure            : 1

Resource            : JetSessions[C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue\mail.que]
CurrentResourceUse  : Low
PreviousResourceUse : Low
PressureTransitions : [PressureTransitions: MediumToHigh=1500 HighToMedium=1400 LowToMedium=1000 MediumToLow=900]
Pressure            : 9

Resource            : CheckpointDepth[C:\Program Files\Microsoft\Exchange
                      Server\V15\TransportRoles\data\Queue\mail.que]
CurrentResourceUse  : Low
PreviousResourceUse : Low
PressureTransitions : [PressureTransitions: MediumToHigh=300 HighToMedium=280 LowToMedium=250 MediumToLow=230]
Pressure            : 0

Resource            : DatabaseUsedSpace[C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue]
CurrentResourceUse  : Low
PreviousResourceUse : Low
PressureTransitions : [PressureTransitions: MediumToHigh=99 HighToMedium=97 LowToMedium=96 MediumToLow=94]
Pressure            : 55

Resource            : UsedDiskSpace[C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue]
CurrentResourceUse  : Low
PreviousResourceUse : Low
PressureTransitions : [PressureTransitions: MediumToHigh=99 HighToMedium=94 LowToMedium=90 MediumToLow=88]
Pressure            : 56

Resource            : UsedDiskSpace[C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data]
CurrentResourceUse  : Low
PreviousResourceUse : Low
PressureTransitions : [PressureTransitions: MediumToHigh=99 HighToMedium=94 LowToMedium=90 MediumToLow=88]
Pressure            : 56



Exchange | Exchange Server | Other
Exchange | Exchange Server | Other

A robust email, calendaring, and collaboration platform developed by Microsoft, designed for enterprise-level communication and data management.Miscellaneous topics that do not fit into specific categories.

Exchange | Exchange Server | Management
Exchange | Exchange Server | Management

The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.

0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Андрей Будников 0 Reputation points
    2026-03-12T10:29:45.7933333+00:00

    The issue is not related to permissions. The cmdlet does not work when executed from PowerShell, but it works when executed from EMC. In the script, use:

    $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $ExchangePowerShellUri -Authentication Kerberos
    

    instead of:

    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn
    
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.