Trace-Command


Enables tracing of the specified trace source instance(s) for the duration of the expression or command.

Snap-In: Microsoft.PowerShell.Utility

Syntax:

Trace-Command

 [-Name] <String[]> [-Expression] <ScriptBlock> [ [-Option] <PSTraceSourceOptions>] [-InputObject <PSObject>] [-ListenerOption <TraceOptions>] [-FilePath <String>] [-Force] [-Debugger] [-PSHost] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] 

Trace-Command

 [-Name] <String[]> [-Command] <String> [ [-Option] <PSTraceSourceOptions>] [-InputObject <PSObject>] [-ArgumentList <Object[]>] [-ListenerOption <TraceOptions>] [-FilePath <String>] [-Force] [-Debugger] [-PSHost] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] 

Description:

This cmdlet turns on tracing for the trace source(s) for the given expression. The behavior is exactly same as in Set-TraceSource, except the setting is temporary and applied during the execution of the given expression. The second parameterSet using -Command behaves more like a command would in a pipeline. For example, command discovery is not repeated for each incoming object.



Windows PowerShell. TFM
Internet Forensics
ISBN: 982131445
EAN: 2147483647
Year: 2004
Pages: 289

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net