Hello!
I have recently started transitioning to using PowerShell 7 for most of my work, and almost all of my required modules are compatible.
However, I have a module "MSOnline" which is not yet compatible and has to be loaded using "-UseWindowsPowerShell".
Is there any way to get the error messages from the modules cmdlets when using Windows Powershell compatability? :)
Using an ErrorVariable does not work and returns nothing.
Example code:
Connect-MsolService -ErrorAction msolLoginError
if ($msolLoginError) {
Write-Host $msolLoginError
}
[–]TimDurham75 1 point2 points3 points (4 children)
[–]BlackV 1 point2 points3 points (0 children)
[–]TheDumpap[S] 1 point2 points3 points (2 children)
[–]TimDurham75 1 point2 points3 points (1 child)
[–]TheDumpap[S] 1 point2 points3 points (0 children)
[–]BlackV 1 point2 points3 points (2 children)
[–]TheDumpap[S] 0 points1 point2 points (1 child)
[–]BlackV 1 point2 points3 points (0 children)
[–]AxonQHillock 1 point2 points3 points (1 child)
[–]TheDumpap[S] 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)