Get-Counter命令在Powershell Core中不起作用

时间:2018-09-14 07:09:08

标签: windows powershell powershell-core

我已经从Here安装了Powershell Core。但是在此PowerShell核心 Get-Counter 命令不起作用。

有什么方法可以在PowerShell Core中运行 Get-Counter 命令。

2 个答案:

答案 0 :(得分:1)

如果Get-Counter命令在Windows的预构建PowerShell上不起作用,则可以从以下URL添加所需命令的程序包:

https://www.powershellgallery.com

答案 1 :(得分:0)

有一个适用于PS Core的Windows兼容模块:

https://devblogs.microsoft.com/powershell/announcing-general-availability-of-the-windows-compatibility-module-1-0-0/

您可以从PSGallery安装Enable-PSRemoting,然后从PS Core运行Invoke-WinCommand {get-counter}