Site icon TOSS

Set-SbecLogSession

powershell

Set-SbecLogSession is accessible with the help of BootEventCollector module. To configure BootEventCollector, go through this link.

Synopsis

Updates the settings for a log session.

Description

The Set-SbecLogSession cmdlet updates the settings for a log session.

You can change the properties of an object before passing it as input to this cmdlet rather than passing changes as parameters. In this case, make sure to set the properties directly in the object rather than in its Trace field (the modifications of Trace are silently ignored by PowerShell).

The cmdlet parameters that are unused or set to $Null are left unchanged.

You cannot update the session name.

The operating system may refuse to change some parameters or silently ignore the updates.

Parameters

-BufferSize

Specifies the buffer size for the session, in kilobytes. This is the size of one buffer, with the count of these buffers set by the MinimumBufferCount and MaximumBufferCount parameters.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ClockType

Specifies the type of clock used for the events collected by this session. The acceptable values for this parameter are:

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-DisableKd

Changes the LogFileMode flags to disable the forwarding through the kernel transport to the collector for the real-time log sessions. The switches EnableKd and DisableKd are mutually exclusive.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EnableKd

Changes the LogFileMode flags to enable the forwarding through the kernel transport to the collector for the real-time log sessions. The switches EnableKd and DisableKd are mutually exclusive.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-FlushSeconds

Specifies the timeout in seconds for the session buffers to get automatically flushed. You can disable the flushing of buffers on timeout by setting this parameter to 0, then the buffers will be written only when full or on an explicit flush.

Type:UInt32
Aliases:FlushTimer
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-KernelEnableFlags

Specifies flags for the NT Kernel Logger that enable the kernel events. For the setup and boot monitoring, the only reasonable flag is Process. This enumeration type is defined in $PsHome\Modules\BootEventCollector\SbecTraceHelpers.psm1. The acceptable values for this parameter are:

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-LogFileMode

Specifies the new flags for the log file mode. The parameters EnableKd and DisableKd are applied on top of these flags. This enumeration type is defined in $PsHome\Modules\BootEventCollector\SbecTraceHelpers.psm1. The most used bit values in it are:

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-MaximumBufferCount

Specifies the maximum number of buffers to allocate for this session.

Type:UInt32
Aliases:MaximumBuffers, maxbuf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-MaximumFileSize

Specifies the maximum file size after which the session may switch to the next file, in megabytes. Use 0 for no limit.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-MinimumBufferCount

Specifies the minimum number of buffers to allocate for this session.

Type:UInt32
Aliases:MinimumBuffers, minbuf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the session to create.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the ETL file where the session will write its log. The session must have the file mode enabled to write to a file; a session in the real-time mode ignores the file.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Session

Specifies the GUID for the session.

Type:TraceSessionInfo[]
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

-SimulateError

Simulates a Windows error in session creation, and causes the function to throw an error. You can specify this parameter to test error handling.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Syntax

Set-SbecLogSession -Session <TraceSessionInfo[]> [-Path <Object>] [-ClockType <Object>] [-BufferSize <Object>] [-MinimumBufferCount <UInt32>] [-MaximumBufferCount <UInt32>] [-MaximumFileSize <Object>] [-FlushSeconds <UInt32>] [-LogFileMode <Object>] [-KernelEnableFlags <Object>] [-EnableKd] [-DisableKd] [-SimulateError <Int32>] [<CommonParameters>]

Set-SbecLogSession -Name <String[]> [-Path <Object>] [-ClockType <Object>] [-BufferSize <Object>] [-MinimumBufferCount <UInt32>] [-MaximumBufferCount <UInt32>] [-MaximumFileSize <Object>] [-FlushSeconds <UInt32>] [-LogFileMode <Object>] [-KernelEnableFlags <Object>] [-EnableKd] [-DisableKd] [-SimulateError <Int32>] [<CommonParameters>]

You can check the Version, CommandType and Source of this cmdlet by giving below command.

Get-Command Set-SbecLogSession

You can also read about

To know more PowerShell cmdlets(Commands) on BootEventCollector click here

Click on this Link for an Single place where you get all the PowerShell cmdlet sorted based on the modules.

You can also refer other blogs on PowerShell at link

You can also refer other blogs on Microsoft at link

And also if you required any technology you want to learn, let us know below we will publish them in our site http://tossolution.com/

Like our page in Facebook and follow us for New technical information.

References are taken from Microsoft

Exit mobile version