Summary
We started the final section of the book in this chapter on using PowerShell in different environments. We’ve started with the Windows environment, arguably the environment in which PowerShell is most effective. However, we saw there are some important differences between PowerShell 7 and Windows PowerShell.
We saw that PowerShell 7 can’t necessarily use modules written for Windows PowerShell, and we looked at three ways of coping with that; finding an equivalent module for PowerShell 7, loading the module anyway, or using Compatibility mode.
While most of the time Compatibility mode is used transparently, we looked at how it works, and some cases where we might want to limit how it is used. However, it is incredibly useful, and we saw that it is getting better all the time.
We moved on to look at some stuff that just doesn’t work with PowerShell 7, and why. Generally, this is related to older modules that are no longer worth rewriting to be compatible...