无法在PowerShell中执行pefcmdlet

时间:2017-01-07 18:12:23

标签: powershell

我正在尝试运行New-PefTraceSession,但它显示错误为

New-PefTraceSession : The term 'New-PefTraceSession' is not recognized as the name of a cmdlet, function, script file,
 or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.

我尝试将模块安装为install-module pef,但显示错误为

PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'PEF'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1375 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters

3 个答案:

答案 0 :(得分:1)

Using powershell to automate tracing

  

虽然使用UI进行跟踪很简单,但它现在有局限性。在跟踪棘手问题时,您需要可扩展性和灵活性,以便检测何时开始和停止跟踪。我们通过利用PowerShell和一组新的Cmdlet 与Message Analyzer 一起提供,从而在Message Analyzer中为此提供了便利,您可以从Microsoft下载中心下载该文件。

您可以下载消息分析器here

答案 1 :(得分:0)

如果在安装Microsoft Message Analyzer msi软件包后仍然遇到问题,请参阅cmdlet的在线文档: https://technet.microsoft.com/en-us/library/dn456526(v=wps.630).aspx

答案 2 :(得分:0)

复制文件夹 PEF

C:\Program Files\Microsoft Message Analyzer\PowerShell

C:\Program Files\WindowsPowerShell\Modules

然后,模块PEF可用并且cmdlet工作。