Edit

Share via


Set-CMBootImage

Modify an OS boot image.

Syntax

SetByValueMandatory (Default)

Set-CMBootImage
    -InputObject <IResultObject>
    [-AddOptionalComponent <IResultObject[]>]
    [-BackgroundBitmapPath <String>]
    [-CopyToPackageShareOnDistributionPoint <Boolean>]
    [-CustomPackageShareName <String>]
    [-DeployFromPxeDistributionPoint <Boolean>]
    [-Description <String>]
    [-DisconnectUserFromDistributionPoint <Boolean>]
    [-DisconnectUserFromDistributionPointMins <UInt32>]
    [-DisconnectUserFromDistributionPointRetryCount <UInt32>]
    [-DistributionPointUpdateSchedule <IResultObject>]
    [-EnableBinaryDeltaReplication <Boolean>]
    [-EnableCommandSupport <Boolean>]
    [-EnablePrestartCommand <Boolean>]
    [-Force]
    [-IncludeFilesForPrestart <Boolean>]
    [-InputLocale <String>]
    [-NewName <String>]
    [-PassThru]
    [-Path <String>]
    [-PersistContentInCache <Boolean>]
    [-PrestageBehavior <PrestageBehavior>]
    [-PrestartCommandLine <String>]
    [-PrestartIncludeFilesDirectory <String>]
    [-Priority <Priority>]
    [-Reload]
    [-RemoveOptionalComponent <IResultObject[]>]
    [-ScratchSpace <UInt32>]
    [-SendToPreferredDistributionPoint <Boolean>]
    [-Version <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetById

Set-CMBootImage
    -Id <String>
    [-AddOptionalComponent <IResultObject[]>]
    [-BackgroundBitmapPath <String>]
    [-CopyToPackageShareOnDistributionPoint <Boolean>]
    [-CustomPackageShareName <String>]
    [-DeployFromPxeDistributionPoint <Boolean>]
    [-Description <String>]
    [-DisconnectUserFromDistributionPoint <Boolean>]
    [-DisconnectUserFromDistributionPointMins <UInt32>]
    [-DisconnectUserFromDistributionPointRetryCount <UInt32>]
    [-DistributionPointUpdateSchedule <IResultObject>]
    [-EnableBinaryDeltaReplication <Boolean>]
    [-EnableCommandSupport <Boolean>]
    [-EnablePrestartCommand <Boolean>]
    [-Force]
    [-IncludeFilesForPrestart <Boolean>]
    [-InputLocale <String>]
    [-NewName <String>]
    [-PassThru]
    [-Path <String>]
    [-PersistContentInCache <Boolean>]
    [-PrestageBehavior <PrestageBehavior>]
    [-PrestartCommandLine <String>]
    [-PrestartIncludeFilesDirectory <String>]
    [-Priority <Priority>]
    [-Reload]
    [-RemoveOptionalComponent <IResultObject[]>]
    [-ScratchSpace <UInt32>]
    [-SendToPreferredDistributionPoint <Boolean>]
    [-Version <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetByName

Set-CMBootImage
    -Name <String>
    [-AddOptionalComponent <IResultObject[]>]
    [-BackgroundBitmapPath <String>]
    [-CopyToPackageShareOnDistributionPoint <Boolean>]
    [-CustomPackageShareName <String>]
    [-DeployFromPxeDistributionPoint <Boolean>]
    [-Description <String>]
    [-DisconnectUserFromDistributionPoint <Boolean>]
    [-DisconnectUserFromDistributionPointMins <UInt32>]
    [-DisconnectUserFromDistributionPointRetryCount <UInt32>]
    [-DistributionPointUpdateSchedule <IResultObject>]
    [-EnableBinaryDeltaReplication <Boolean>]
    [-EnableCommandSupport <Boolean>]
    [-EnablePrestartCommand <Boolean>]
    [-Force]
    [-IncludeFilesForPrestart <Boolean>]
    [-InputLocale <String>]
    [-NewName <String>]
    [-PassThru]
    [-Path <String>]
    [-PersistContentInCache <Boolean>]
    [-PrestageBehavior <PrestageBehavior>]
    [-PrestartCommandLine <String>]
    [-PrestartIncludeFilesDirectory <String>]
    [-Priority <Priority>]
    [-Reload]
    [-RemoveOptionalComponent <IResultObject[]>]
    [-ScratchSpace <UInt32>]
    [-SendToPreferredDistributionPoint <Boolean>]
    [-Version <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Use this cmdlet to modify an OS boot image. Boot images are Windows Preinstallation Environment (Windows PE) images into which you boot a client computer before you install an OS.

You can add device drivers to a boot image or change its properties. Before you can add a new device driver, you must first import the driver to the Configuration Manager driver catalog and enable it.

Each version of Configuration Manager supports a specific version of the Windows Assessment and Deployment Kit (Windows ADK). You can service, or customize, boot images when they're based on a Windows PE version from the supported version of Windows ADK.

For more information, see Manage boot images with Configuration Manager.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Rename a boot image

This command gets a boot image by its package ID, and then renames it.

Set-CMBootimage -Id "CM100004" -NewName "Custom boot image"

Example 2: Set descriptive properties

This command gets a boot image by its name, and then adds a version and description to it.

Set-CMBootImage -Name "Custom boot image (x64)" -Version "Contoso v2.1" -Description "Managed by jqpublic"

Example 3: Set the keyboard layout

The following example sets the default keyboard layout of the boot image to the Russian (Russia) language. It identifies the boot image by its ID.

Set-CMBootimage -Id "CM100004" -InputLocale "ru-ru"

Example 4: Add optional components

This example gets the .NET and PowerShell optional components, and then adds them to the boot image.

$netfxOC = Get-CMWinPEOptionalComponentInfo -Architecture 'x64' -Name 'WinPE-NetFX' -LanguageId 1033
$pwshOC = Get-CMWinPEOptionalComponentInfo -Architecture 'x64' -Name 'WinPE-PowerShell' -LanguageId 1033
$OCs = @($netfxOC, $pwshOC)

Set-CMBootImage -Id 'XYZ00556' -AddOptionalComponent $OCs

Parameters

-AddOptionalComponent

Specify an array of optional component objects to add to the boot image. To get this object, use the Get-CMWinPEOptionalComponentInfo cmdlet.

The following components are commonly used:

  • Microsoft .NET (WinPE-NetFX): This component is a prerequisite for PowerShell. It's one of the larger optional components.
  • Windows PowerShell (WinPE-PowerShell): This component requires .NET, and adds limited PowerShell support. If you run custom PowerShell scripts during the WinPE phase of your task sequence, add this component. There are other components that may be required for other PowerShell cmdlets.
  • HTML (WinPE-HTA): If you run custom HTML applications during the WinPE phase of your task sequence, add this component.

For more information, see Manage boot images - optional components.

Parameter properties

Type:

IResultObject[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:AddOptionalComponents

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BackgroundBitmapPath

Specify the network file path of a custom background image file to use in Windows PE.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CopyToPackageShareOnDistributionPoint

Clients can always download a boot image from a distribution point. If you set this parameter to $true, the site makes it available via a named network share on distribution points. Use CustomPackageShareName to specify a custom share name.

When you enable this option, more space is required on distribution points. It applies to all distribution points to which you distribute this boot image.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:CopyToPackageShareOnDistributionPoints

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomPackageShareName

If you enable CopyToPackageShareOnDistributionPoint, you can use this parameter to customize the share name. The maximum length is 127 characters, and can't include any of the following characters: " / [ ] : | < > + = ; , ? *. You can specify a share name and a folder name, but then the maximum for each is 80 characters. For example, ShareName\FolderName.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeployFromPxeDistributionPoint

Set this parameter to $true to make this boot image available from a PXE-enabled distribution point. For more information, see Use PXE to deploy Windows over the network.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Description

Specify an optional description of a boot image to help you identify it.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisconnectUserFromDistributionPoint

This option is deprecated. It sets the ForcedDisconnectEnabled property of the boot image.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DisconnectUsersFromDistributionPoints

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisconnectUserFromDistributionPointMins

This option is deprecated. It sets the ForcedDisconnectDelay property of the boot image.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DisconnectUsersFromDistributionPointsMinutes

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisconnectUserFromDistributionPointRetryCount

This option is deprecated. It sets the ForcedDisconnectNumRetries property of the boot image.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DisconnectUsersFromDistributionPointsRetries

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DistributionPointUpdateSchedule

Use this parameter to update distribution points on a schedule. To get a schedule object, use the New-CMSchedule cmdlet.

Parameter properties

Type:IResultObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableBinaryDeltaReplication

Set this parameter to $true to enable binary differential replication (BDR). For more information, see Fundamental concepts for content management in Configuration Manager.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableCommandSupport

In non-production, test environments only, you can set this parameter to $true to enable command support. When a device boots to this image, you can press F8 to open an administrative command prompt. This option is useful for troubleshooting while you're testing your deployment. Using this setting in a production deployment isn't advised because of security concerns.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnablePrestartCommand

Set this parameter to $true to enable a prestart command. This command line runs before the task sequence starts.

Also configure the following parameters: IncludeFilesForPrestart, PrestartCommandLine, PrestartIncludeFilesDirectory.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Run the command without asking for confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

Specify a boot image ID to configure. This value is a standard package ID, for example: XYZ00002.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:PackageId

Parameter sets

SetById
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludeFilesForPrestart

If you enable EnablePrestartCommand, use this parameter if your prestart command requires other files to run. Then use the PrestartIncludeFilesDirectory parameter to specify the location of the files to include.

For example, if you want to run a batch script, use this option to include the script file.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputLocale

Use this parameter to configure the default keyboard layout for a boot image. Specify the language tag. For example, to set the input locale to Russian (Russia), specify the string ru-ru. For more information, see [MS-LCID]: Windows Language Code Identifier (LCID) Reference.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specify a boot image object to configure. To get this object, use the Get-CMBootImage cmdlet.

Parameter properties

Type:IResultObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByValueMandatory
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specify the name of a boot image to configure.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NewName

Specify a new name for the boot image.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Add this parameter to return an object that represents the item with which you're working. By default, this cmdlet may not generate any output.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Path

Specify the network path of the Windows PE image that this boot image uses. You can't change the path for default boot images.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ImagePath

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PersistContentInCache

If you don't want the content of this package to age out of the client cache to make room for other content, set this parameter to $true to persist it in the client cache.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrestageBehavior

Specify the behavior when you enable a distribution point for prestaged content:

  • ManualCopy: Manually copy the content in this package to the distribution point
  • DownloadDelta: Download only content changes to the distribution point
  • OnDemand: Automatically download content when packages are assigned to distribution points

For more information, see Use prestaged content.

Parameter properties

Type:PrestageBehavior
Default value:None
Accepted values:ManualCopy, DownloadDelta, OnDemand
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrestartCommandLine

If you enable EnablePrestartCommand, use this parameter to specify the command line to run. The maximum length is 4096 characters.

If the command line requires files that aren't in Windows PE, use the IncludeFilesForPrestart and PrestartIncludeFilesDirectory parameters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:CommandLine

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrestartIncludeFilesDirectory

If you enable EnablePrestartCommand and IncludeFilesForPrestart, use this parameter to specify the network path of the files to include in the boot image.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Priority

Specify the order in which the site sends the content to other sites and the distribution points in this site.

The site sends high priority content before packages with medium or low priority. Packages with equal priority are sent in the order in which they're created.

Parameter properties

Type:Priority
Default value:None
Accepted values:High, Medium, Low
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Reload

Applies to version 2006 and later. If the versions of the Windows ADK components in the boot image are out of date, add this parameter to reload the boot image with the current Windows PE version from the Windows ADK. For more information, see Update distribution points with the boot image.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ReloadImage

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RemoveOptionalComponent

Specify an array of optional component objects to remove from the boot image. To get this object, use the Get-CMWinPEOptionalComponentInfo cmdlet.

Don't remove the following components, which are required by Configuration Manager:

  • Scripting (WinPE-Scripting)
  • Startup (WinPE-SecureStartup)
  • Network (WinPE-WDS-Tools)
  • Scripting (WinPE-WMI)

Parameter properties

Type:

IResultObject[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:RemoveOptionalComponents

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ScratchSpace

Configure the Windows PE scratch space, which is temporary storage (RAM drive) used by WinPE. For example, when an application is run within WinPE and needs to write temporary files, WinPE redirects the files to the scratch space in memory to simulate the presence of a hard disk. By default, this amount is 512 MB for devices with more than 1 GB of RAM, otherwise the default is 32 MB.

Parameter properties

Type:UInt32
Default value:None
Accepted values:32, 64, 128, 256, 512
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SendToPreferredDistributionPoint

If you want to enable on-demand content distribution to preferred distribution points, set this parameter to $true. When you enable this setting, if a client requests the content for the package and the content isn't available on any distribution points, then the management point distributes the content. For more information, see On-demand content distribution.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SendToPreferredDistributionPoints

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Version

Specify the version of the boot image. This value isn't the OS version, but a string that you manage.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object