Test-SbecActiveConfig

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

Synopsis

Tests the active Boot Event Collector configuration.

Description

The Test-SbecActiveConfig cmdlet tests whether the specified Boot Event Collector configuration matches the current active configuration.

The comparison is done on the “normalized” text of the configuration by removing all the carriage return (\r) characters and by removing any empty lines at the end of configuration. The empty lines in the middle of the text are not removed, and the white space matters.

This command returns $True if the configurations match; otherwise, it returns $False.

This command throws an error on failures.

You must have the Builtin Administrator privilege to run this command.

Parameters

-CimSession

Runs the cmdlet on the remote computers through a remote session. Enter a session object, such as the output of a New-CimSession or Get-CimSession cmdlet or an array of these objects. The default is to run the cmdlet on the local computer. For more information, see About_CimSession.

Type:CimSession[]
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ComputerName

Specifies the names of the computers on which you want to perform the operation. You can specify a fully qualified domain name (FQDN), a NetBIOS name, or an IP address for each computer. For more information see Invoke-CimMethod on MSDN.

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

-Content

Specifies the configuration to test. The acceptable values for this parameter are:

  • A multiline string. Use \n to indicate line breaks.
  • An array of one-line strings. This cmdlet merges the array.
  • A mix of multiline strings and string arrays.
Type:String[]
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Syntax

Test-SbecActiveConfig [-Content] <String[]> [[-ComputerName] <String[]>] [[-CimSession] <CimSession[]>] [<CommonParameters>]

—————–Example 1—————–
Test a configuration file through a pipeline
PS C:\> Get-Content -Path “c:\BootConfig.xml” | Test-SbecActiveConfig
This command compares the current configuration with the contents of the file BootConfig.xml by passing it through a pipeline.

—————–Example 2—————–
Test a configuration file through a parameter
PS C:\> Test-SbecActiveConfig -Content “(Get-Content -Path “c:\BootConfig.xml”)”
This command compares the current configuration with the contents of the file BootConfig.xml by passing it as a parameter.

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

Get-Command Test-SbecActiveConfig

Get-Command Test-SbecActiveConfig powershell script command cmdlet

You can also read about

  • Get-SbecActiveConfig
  • Set-SbecActiveConfig
  • Test-SbecConfig

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

Leave a Reply

Your email address will not be published. Required fields are marked *