Skip to content

Confirm-ExchangeShell function improved to work on management server with SerializedDataSigning turned on#1512

Merged
lusassl-msft merged 1 commit into
mainfrom
lusassl-ConfirmExchangeShellSerializedDataSigningFix
Feb 28, 2023
Merged

Confirm-ExchangeShell function improved to work on management server with SerializedDataSigning turned on#1512
lusassl-msft merged 1 commit into
mainfrom
lusassl-ConfirmExchangeShellSerializedDataSigningFix

Conversation

@lusassl-msft
Copy link
Copy Markdown
Contributor

Issue:
It was reported that Confirm-ExchangeShell doesn't work well in specific scenarios. After some research we were able to pin it down to the Serialized Data Signing feature which causes this behavior if turned on and if the script was executed on a management server (no Exchange roles installed).

Resolve #1507

Reason:
The type will change to PSObject if Serialized Data Signing was enabled and EMS on a management server is used.
We have an internal work item regarding this behavior as several customers reported it.

Fix:
Check for the SerializationData property if GetType().Name property is not EventCategoryObject. The SerializationData property is available in EMS, it is not available if Exchange servers was connected by using remote PowerShell.

image

Validation:
Lab

@lusassl-msft lusassl-msft added bug Something isn't working Shared Function labels Feb 20, 2023
@lusassl-msft lusassl-msft requested a review from a team as a code owner February 20, 2023 11:26
@lusassl-msft lusassl-msft marked this pull request as draft February 20, 2023 11:29
@lusassl-msft lusassl-msft marked this pull request as ready for review February 20, 2023 12:45
@lusassl-msft lusassl-msft force-pushed the lusassl-ConfirmExchangeShellSerializedDataSigningFix branch from 540e858 to 60e0e26 Compare February 23, 2023 14:16
bill-long
bill-long previously approved these changes Feb 28, 2023
@lusassl-msft lusassl-msft force-pushed the lusassl-ConfirmExchangeShellSerializedDataSigningFix branch from 3bd591c to 12c2d21 Compare February 28, 2023 14:14
@dpaulson45 dpaulson45 requested a review from bill-long February 28, 2023 14:28
@lusassl-msft lusassl-msft merged commit 3baa470 into main Feb 28, 2023
@lusassl-msft lusassl-msft deleted the lusassl-ConfirmExchangeShellSerializedDataSigningFix branch February 28, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Shared Function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue] - ExchangeExtendedProtectionManagement.ps1 - "This script requires to be run inside of Exchange Management Shell"

3 participants