在电脑上运行命令(powershell的版本是4.0的): Add-PSSnapin perf.powershell 报错,请问怎么注册安装‘perf.powershell’呢,看网上好像说需要用installutil.exe工具注册,具体怎么注册呢?
Add-PSSnapin : The Windows PowerShell snap-in 'perf.powershell' is not installed on this computer.
At line:1 char:1
+ Add-PSSnapin perf.powershell
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (perf.powershell:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
有些机器上运行这个命令没问题,通过Get-PSSnapin -Registered可以看到perf.powershell已经注册了
Name : Perf.Powershell
PSVersion : 4.0
Description : Performance PowerShell Cmdlets