Forum Discussion
UShort Error with the Exchange Module
Install Powershell 7.x and try again:
Source:
https://lukasz.de/powershell-microsoft-365/fehlerbehebung-bei-der-dkim-einrichtung-in-microsoft-365-clientfehler-ex43c0ac/
That's fine as an individual workaround but it doesn't absolve the need for fixing the bug. It doesn't serve as a reliable, scalable workaround as PowerShell does not ship with Windows and getting customer acceptance for mass deployments of any kind in large change-managed environments is not always trivial.
But this is missing the point. From the following article:
"All versions of the module are supported in Windows PowerShell 5.1."
ushort (and other types) are not supported by .NET Framework meaning it should not have been used if the module is indeed intended to operate under both .NET/PowerShell environments. Rather, the UInt16 type (to which ushort is mapped during compilation in the C# context) should have been used, as it is supported by both Core and Framework.
PowerShell
Windows PowerShell
This is a clear-cut bug on those two commandlets that needs fixing (and it's a very, very easy fix).
Cheers,
Lain
- LainRobertsonSep 30, 2024Silver Contributor
I've opened a bug on github for this, as it's still an issue under ExchangeOnlineManagement 3.6.0 (second post):
Either it should be fixed or the support stance should be updated to exclude Windows PowerShell. Or they could just continue to ignore the bug, I guess. Time will tell.
Cheers,
Lain