You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for reporting an issue, making a suggestion, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to respond. Thanks!
Category
Suggested sample, script, or tool
[ X] Bug in existing sample, script, or tool
Question / Feedback
Issue Details
The Find-DelegateMailboxes.ps1 script throws an error when multiple Exchange sessions exist in the same shell session.
Bug in existing sample, script, or tool
Running the Find-DelegateMailboxes.ps1 script, I encountered an error upon initial execution. The error I received indicated that the Get-exchangeserver cmdlet could not accept an array as a parameter. See attached screenshot of the error.
### Expected / Desired Behavior
The expected behavior is that the error message is not generated.
Observed Behavior
The observed behavior is that the error is generated when multiple Exchange sessions exist in the same shell session. I was able to determine that the line of code that causes the error is line number 845 ($exchangeversion = get-exchangeserver $exchserversession | select -expandproperty AdminDisplayVersion).
Steps to Reproduce
Open a PowerShell session and then establish multiple sessions to Exchange where the configuration name of the session is Microsoft.Exchange. For example, open a PowerShell session and establish a remote session to an Exchange 2016 server and then in the same PowerShell session open another remote session to Exchange Online. Ensure that both sessions have a configuration name of Microsoft.Exchange. then run the Find-DelegateMailboxes.ps1 script and you will see the error.
To resolve this issue a slight tweak to line 844 should be all that is needed. Line 844 should be updated as such: $exchserversession = get-pssession | ?{$.configurationname -eq "Microsoft.Exchange" -and $.state -eq "Opened" } | select -expandproperty computername
Please see additional screenshot of a PowerShell session with multiple Exchange sessions opened where the ConfigurationName attribute is set to Microsoft.Exchange. In this instance my previously established session was broken (due to a network outage) and a new session was created when I attempted to run a new cmdlet.
The text was updated successfully, but these errors were encountered:
Thank you for reporting an issue, making a suggestion, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to respond. Thanks!
Category
Issue Details
The Find-DelegateMailboxes.ps1 script throws an error when multiple Exchange sessions exist in the same shell session.
Bug in existing sample, script, or tool
Running the Find-DelegateMailboxes.ps1 script, I encountered an error upon initial execution. The error I received indicated that the Get-exchangeserver cmdlet could not accept an array as a parameter. See attached screenshot of the error.
### Expected / Desired Behavior The expected behavior is that the error message is not generated.
Observed Behavior
The observed behavior is that the error is generated when multiple Exchange sessions exist in the same shell session. I was able to determine that the line of code that causes the error is line number 845 ($exchangeversion = get-exchangeserver $exchserversession | select -expandproperty AdminDisplayVersion).
Steps to Reproduce
Open a PowerShell session and then establish multiple sessions to Exchange where the configuration name of the session is Microsoft.Exchange. For example, open a PowerShell session and establish a remote session to an Exchange 2016 server and then in the same PowerShell session open another remote session to Exchange Online. Ensure that both sessions have a configuration name of Microsoft.Exchange. then run the Find-DelegateMailboxes.ps1 script and you will see the error.
To resolve this issue a slight tweak to line 844 should be all that is needed. Line 844 should be updated as such:
$exchserversession = get-pssession | ?{$ .configurationname -eq "Microsoft.Exchange" -and $.state -eq "Opened" } | select -expandproperty computername
Please see additional screenshot of a PowerShell session with multiple Exchange sessions opened where the ConfigurationName attribute is set to Microsoft.Exchange. In this instance my previously established session was broken (due to a network outage) and a new session was created when I attempted to run a new cmdlet.
The text was updated successfully, but these errors were encountered: