在Windows Server Core中,从msi (7.2.0)安装版本7后,预期documents文件夹中应该有两个文件夹,一个用于WindowsPowerShell (版本5),另一个用于PowerShell (版本7)。 虽然安装了7.2.0,但Windows Server Core正在使用版本5启动。正在寻找one liner将默认启动从5更改为7。 Windows Server Core中没有"Settings“链接。它只是命令行。 是否有命令行可以将此开关从5号切换到7号? 可以在C:\Program Files\Powershell\7下以pwsh.exe的形式获得
我使用这个PowerShell::Cmdlet模块从perl脚本运行powershell命令,但是我一直收到这个错误,尽管我已经将该模块放在了lib文件夹中。
Can't locate object method "new" via package "PowerShell" at
use strict;
use warnings;
use PowerShell::Cmdlet;
my $res ;
my $command = PowerShell
->new('Get-ChildItem', [Image => &