Are you looking for this: Control remote PowerShell access to Exchange servers
The parameter -RemotePowerShellEnabled in command Set-User specifies whether the user has access to remote PowerShell. Remote PowerShell access is required to open the Exchange Management Shell or the Exchange admin center (EAC), even if you're trying to open the Exchange Management Shell or the EAC on the local Mailbox server. Valid values are:
$true: The user has access to remote PowerShell.
$false: The user doesn't have access to remote PowerShell.
Set-User "User" -RemotePowerShellEnabled $false
And we could use the Exchange Management Shell to disable remote PowerShell access for many users:
And in Exchange 2019 you could use client access rule to meet this need:
Blocking EAC / Remote PowerShell access in Exchange 2019.
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Client Access Rules in Exchange 2019
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.