Hello there,
This exception typically occurs when you're trying to use a feature or functionality that is not implemented or available in the current environment.
Given that Microsoft disabled the RPS for Exchange, it's possible that the specific cmdlets, features, or functionalities you were using in your code were reliant on the RPS. When you attempt to use these features now, you might encounter this exception since the underlying infrastructure required for those features is no longer available.
To address this issue, you would need to update your code to use alternative methods or cmdlets that are still supported and available in the environment where you're running your code.
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer--