New-SbecUnattendFragment is accessible with the help of BootEventCollector module. To configure BootEventCollector, go through this link.
Synopsis
Creates a fragment for Unattend.xml with post-install commands.
Description
The New-SbecUnattendFragment cmdlet creates a fragment for Unattend.xml with post-install commands. You use these commands to configure Setup and Boot Event monitoring on the image that you are preparing.
The fragment generated represents the text of the <RunSynchronous>
element. That element is normally inserted into the Unattend.xml in <Component name="Microsoft-Windows-Setup">
, after <DiskConfiguration>
The generated fragment relies on the winpeshl.ini file created in the WinPE boot image by Enable-SbecBootImage and will not work without it.
The hash table that this cmdlet returns contains the following elements:
<UnattendText>
. Text of the XML fragment for insertion into Unattend.xml, as an array of strings.<NextOrder>
. The next uint32 value for<Order>
in case if you want to add more commands to the fragment. See the description of the FirstOrder parameter for more information.
Parameters
-BusParameters
Specifies the bus parameters to use to select the NIC of the target computer for communication. This value overrides the default choice of the first supported adapter. This value applies to all the computers that use this image; it can be used only if the hardware of these computers is sufficiently homogeneous.
To find the value of bus parameters for a specific NIC on a machine, open Device Manager, and in Network Adapters select the desired device. Right-click the device, select Properties, select the Details tab, and then select Location information. It displays a string of the form PCI bus X, device Y, function Z. The bus parameter to specify in this example is “X,Y,Z”.
Type: | String |
Aliases: | BusParams |
Position: | 3 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CollectorIp
Specifies the IPv4 address of the host on which the Boot Event Collector is located.
Type: | String |
Position: | 0 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CollectorPort
Specifies the port number (common for the target and collector).
Type: | UInt32 |
Position: | 1 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FirstOrder
Specifies the value with which to start the numbering of the auto-generated commands.
The commands in the Unattend.xml must be sequentially ordered by the value in the <Order>
element. Normally the order starts with 1 by default, but if you prepend your own commands, the auto-generated commands must begin with a greater value.
If you specify this parameter, even with the value 1, the text of the XML fragment is generated without the surrounding <RunSynchronous>
element, because you would presumably want to assemble that element from multiple parts.
Type: | UInt32 |
Position: | 7 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Key
Specifies the encryption key for the communication. This value must match the key specified in the collector configuration for this target.
Type: | String |
Position: | 2 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogDbgMask
Specifies the value for the Debug Print Filter bit mask that enables the messages from DbgPrint(). The 0x1 bit must be set to allow the messages with the Bugcheck system crash information. If the mask is set to 0, the command for setting this Registry value is not created.
Type: | UInt32 |
Position: | 6 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Logger
Specifies the AutoLogger sessions for which to enable forwarding. The forwarding on these sessions auto-disables after the operating system starts. Specifying a session explicitly in Logger or PermLogger overrides the defaults for it.
Type: | String[] |
Position: | 4 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NoDefaultLoggers
Indicates that this operation does not automatically add the default set of logger sessions.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PermLogger
Specifies the AutoLogger sessions for which to enable forwarding. The forwarding on these sessions remains enabled after the operating system starts. Specifying a session explicitly in Logger or PermLogger overrides the defaults for it.
Type: | String[] |
Position: | 5 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Syntax
New-SbecUnattendFragment [-CollectorIp] <String> [-CollectorPort] <UInt32> [-Key] <String> [[-BusParameters] <String>] [[-Logger] <String[]>] [[-PermLogger] <String[]>] [-NoDefaultLoggers] [[-LogDbgMask] <UInt32>] [[-FirstOrder] <UInt32>] [<CommonParameters>]
You can check the Version, CommandType and Source of this cmdlet by giving below command.
Get-Command New-SbecUnattendFragment
You can also read about
- Enable-SbecAutologger
- Enable-SbecBootImage
- Enable-SbecWdsBcd
To know more PowerShell cmdlets(Commands) on BootEventCollector click here