在Windows Server Core中,从msi (7.2.0)安装版本7后,预期documents文件夹中应该有两个文件夹,一个用于WindowsPowerShell (版本5),另一个用于PowerShell(版本7)。虽然安装了7.2.0,但Windows Server Core正在使用版本5启动。正在寻找one liner将默认启动从5更改为7。可以在C:\Program Files\Powershell\7下以pwsh.exe</
根据的说法,我应该能够传递命令行参数,例如-Command或-NoExit,但这些参数无法识别:-NoExit : The term '-NoExit' is not recognized as the name of a cmdlet, function, script file, or operable program.-NoLogo : The term '-NoLogo' is not recognized as the name of a cmdlet, functi