我想模拟 PowerShell 3.0
在 PowerShell v3 或 v4 中,您可以使用以下命令模拟 v2:
%windir%\system32\WindowsPowerShell\v1.0\PowerShell.exe -version 2
$Host 透露:版本:2.0
但是,在 PowerShell 4
%windir%\system32\WindowsPowerShell\v1.0\PowerShell.exe -version 3
$Host 现在报告:版本:4.0(我希望是 3:0)
问题:有什么方法可以从 4.0 模拟 PowerShell 3.0?