What doesn’t work with PowerShell 7
However, there are some things on Windows that just don’t work with PowerShell 7 and aren’t likely to either. In this section we’ll cover a few of them, which will set us up nicely for the final section of the chapter, Managing machines with CIM and WMI.
The -ComputerName
parameter had been ported from Windows PowerShell to PowerShell 7; unfortunately, some of the protocols and models that this parameter uses in Windows are not compatible with PowerShell 7, and so the parameter didn’t work. In the most recent releases of PowerShell 7, such as 7.3, the parameter has finally been removed from the non-working cmdlets. For people moving from Windows PowerShell to PowerShell 7, however, it can still cause confusion. The workaround is to use Invoke-Command
instead.
Some important administration modules like UpdateServices
for managing Windows Server Update Services (WSUS) won’t work in Compatibility mode...