Forum Discussion
loy_5656
Jul 20, 2022Copper Contributor
Regarding the different output formats of Powershell Versions 5 and 7.
I use Exchange Online commands through Powershell. I have noticed that Powershell versions 5 and 7 work differently. And I would like to achieve an output format like Powershell version 5, but with...
- Jul 20, 2022
The case has been resolved.
I found out that it was due to the fact that I was using a preview version of ExchangeOnlineManagement 2.0.6-Preview6.
This version loads the module when "Connect-ExchangeOnline" is performed, but that step was omitted entirely, so it may be that the cache was still there when the problem was not fixed by restarting.
PowerShell Gallery | ExchangeOnlineManagement 2.0.6-Preview6
So I fixed it by reinstalling ExchangeOnlineManagement and reverting to version 2.0.5.
Thanks for the solution.
loy_5656
Jul 20, 2022Copper Contributor
I press the Windows button and click on the application that comes up when I search for "Powershell 7".
However, after launching, it always launches with Windows Terminal.
The following consoles gave the desired results.
Only with Powershell 7 did it not produce the expected output. (Windows 11)
- Windows Powershell 5 console
- Powershell 5 with Windows Terminal
I also tried running Powershell 7 from the Windows Powershell 5.1.22000.65 console by typing "pwsh", but the result was the same.
Additionally, I tried it on another Windows 11 PC and got the output I wanted with Powershell 7.2.5 on Windows Terminal, so the problem appears to be my current Windows 11 PC.
loy_5656
Jul 20, 2022Copper Contributor
The case has been resolved.
I found out that it was due to the fact that I was using a preview version of ExchangeOnlineManagement 2.0.6-Preview6.
This version loads the module when "Connect-ExchangeOnline" is performed, but that step was omitted entirely, so it may be that the cache was still there when the problem was not fixed by restarting.
PowerShell Gallery | ExchangeOnlineManagement 2.0.6-Preview6
So I fixed it by reinstalling ExchangeOnlineManagement and reverting to version 2.0.5.
Thanks for the solution.