New-CMTaskSequenceMedia

Creates task sequence media in System Center Configuration Manager.

Syntax

New-CMTaskSequenceMedia
   [-BootableMedia]
   -MediaPath <String>
   [-AllowUnattendedDeployment <Boolean>]
   -MediaInputType <MediaInputType>
   [-DriveName <String>]
   [-MediaSize <MediaSize>]
   -ProtectPassword <Boolean>
   [-Password <SecureString>]
   [-Variable <Hashtable>]
   [-EnablePrestartCommand <Boolean>]
   [-PrestartCommandLine <String>]
   [-CommandIncludeFile <Boolean>]
   [-CommandPackageName <String>]
   [-CommandDistributionPointServerName <String>]
   [-EnableUnknownSupport <Boolean>]
   [-CreateMediaSelfCertificate <Boolean>]
   [-StartDate <DateTime>]
   [-ExpirationDate <DateTime>]
   [-ImportCertificatePath <String>]
   [-ImportCertificatePassword <SecureString>]
   [-UserDeviceAffinity <UserDeviceAffinityType>]
   -BootImageId <String>
   -BootImageDistributionPointServerName <String>
   -BootImageManagementPointServerName <String[]>
   -MediaMode <MediaMode>
   [-AllowUacPrompt]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMTaskSequenceMedia
   [-StandaloneMedia]
   -MediaPath <String>
   [-AllowUnattendedDeployment <Boolean>]
   -MediaInputType <MediaInputType>
   [-DriveName <String>]
   [-MediaSize <MediaSize>]
   -ProtectPassword <Boolean>
   [-Password <SecureString>]
   -TaskSequenceId <String>
   -TaskSequenceDistributionPointServerName <String[]>
   [-Variable <Hashtable>]
   [-EnablePrestartCommand <Boolean>]
   [-PrestartCommandLine <String>]
   [-CommandIncludeFile <Boolean>]
   [-CommandPackageName <String>]
   [-CommandDistributionPointServerName <String>]
   [-IncludeApplicationDependency <Boolean>]
   [-AllowUacPrompt]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMTaskSequenceMedia
   [-StandaloneMedia]
   -MediaPath <String>
   [-AllowUnattendedDeployment <Boolean>]
   [-MediaInputType <MediaInputType>]
   [-DriveName <String>]
   [-MediaSize <MediaSize>]
   [-ProtectPassword <Boolean>]
   [-Password <SecureString>]
   -TaskSequence <IResultObject>
   -TaskSequenceDistributionPoint <IResultObject[]>
   [-Variable <Hashtable>]
   [-EnablePrestartCommand <Boolean>]
   [-PrestartCommandLine <String>]
   [-CommandIncludeFile <Boolean>]
   [-CommandPackage <IResultObject>]
   [-CommandPackageDistributionPoint <IResultObject>]
   [-IncludeApplicationDependency <Boolean>]
   [-AllowUacPrompt]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMTaskSequenceMedia
   [-BootableMedia]
   -MediaPath <String>
   [-AllowUnattendedDeployment <Boolean>]
   [-MediaInputType <MediaInputType>]
   [-DriveName <String>]
   [-MediaSize <MediaSize>]
   [-ProtectPassword <Boolean>]
   [-Password <SecureString>]
   [-Variable <Hashtable>]
   [-EnablePrestartCommand <Boolean>]
   [-PrestartCommandLine <String>]
   [-CommandIncludeFile <Boolean>]
   [-CommandPackage <IResultObject>]
   [-CommandPackageDistributionPoint <IResultObject>]
   [-EnableUnknownSupport <Boolean>]
   [-CreateMediaSelfCertificate <Boolean>]
   [-StartDate <DateTime>]
   [-ExpirationDate <DateTime>]
   [-ImportCertificatePath <String>]
   [-ImportCertificatePassword <SecureString>]
   [-UserDeviceAffinity <UserDeviceAffinityType>]
   -BootImage <IResultObject>
   -BootImageDistributionPoint <IResultObject>
   -BootImageManagementPoint <IResultObject[]>
   [-MediaMode <MediaMode>]
   [-AllowUacPrompt]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMTaskSequenceMedia
   [-PrestagedMedia]
   -MediaPath <String>
   [-AllowUnattendedDeployment <Boolean>]
   -ProtectPassword <Boolean>
   -TaskSequenceId <String>
   -TaskSequenceDistributionPointServerName <String[]>
   [-Variable <Hashtable>]
   [-PrestartCommandLine <String>]
   [-CommandIncludeFile <Boolean>]
   [-CommandPackageName <String>]
   [-CommandDistributionPointServerName <String>]
   -BootImageId <String>
   -BootImageDistributionPointServerName <String>
   -BootImageManagementPointServerName <String[]>
   -MediaMode <MediaMode>
   [-CreatedBy <String>]
   [-Version <String>]
   [-Comment <String>]
   [-OperatingSystemImagePackageId <String>]
   [-OperatingSystemImageName <String>]
   -OperatingSystemImageDistributionPointServerName <String>
   [-Application <IResultObject[]>]
   [-Package <IResultObject[]>]
   [-DriverPackage <IResultObject[]>]
   [-ApplicationName <String[]>]
   [-PackageName <String[]>]
   [-DriverPackageName <String[]>]
   [-AllowUacPrompt]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMTaskSequenceMedia
   [-PrestagedMedia]
   -MediaPath <String>
   [-AllowUnattendedDeployment <Boolean>]
   [-ProtectPassword <Boolean>]
   -TaskSequence <IResultObject>
   -TaskSequenceDistributionPoint <IResultObject[]>
   [-Variable <Hashtable>]
   [-PrestartCommandLine <String>]
   [-CommandIncludeFile <Boolean>]
   [-CommandPackage <IResultObject>]
   [-CommandPackageDistributionPoint <IResultObject>]
   -BootImage <IResultObject>
   -BootImageDistributionPoint <IResultObject>
   -BootImageManagementPoint <IResultObject[]>
   -MediaMode <MediaMode>
   [-CreatedBy <String>]
   [-Version <String>]
   [-Comment <String>]
   [-OperatingSystemImagePackage <IResultObject>]
   -OperatingSystemImageDistributionPoint <IResultObject>
   [-Application <IResultObject[]>]
   [-Package <IResultObject[]>]
   [-DriverPackage <IResultObject[]>]
   [-AllowUacPrompt]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMTaskSequenceMedia
   [-CaptureMedia]
   -MediaPath <String>
   [-MediaInputType <MediaInputType>]
   [-DriveName <String>]
   -BootImage <IResultObject>
   -BootImageDistributionPoint <IResultObject>
   [-AllowUacPrompt]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMTaskSequenceMedia
   [-CaptureMedia]
   -MediaPath <String>
   -MediaInputType <MediaInputType>
   [-DriveName <String>]
   -BootImageId <String>
   -BootImageDistributionPointServerName <String>
   [-AllowUacPrompt]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-CMTaskSequenceMedia cmdlet creates task sequence media in Microsoft System Center Configuration Manager.

Examples

Example 1: Create task sequence media with the captured media option

PS C:\> New-CMTaskSequenceMedia -CaptureMediaOption -MediaPath "\\Contoso320\Users\Administrator.Contoso319DOM\Desktop\DD\1.iso" -MediaInputType CDDVD -BootImageName "Boot" -DistributionPointServerName "Contoso320.Contoso319DOM.NET"

This command creates task sequence media by specifying the CaptureMediaOption parameter. The command also specifies a value for the MediaPath parameter, and a value for the MediaInputType parameter.

Example 2: Create task sequence media with the standalone media option

PS C:\> $Group = @{"6"="8";}
PS C:\> New-CMTaskSequenceMedia -StandAloneMediaOption -Variable $Group -MediaInputType CDDVD -MediaPath "\\Contoso320\Users\Administrator.Contoso319DOM\Desktop\DD\111 - Copy.iso" -ProtectPassword 0 -TaskSequenceId "CCC0000B" -TaskSequenceDistributionPointServerName "\\Contoso320.Contoso319DOM.NET"

The first command creates a mapping, and then stores the result in the $Group variable.

The second command creates task sequence media by specifying the StandAloneMediaOption parameter.

Example 3: Create task sequence media with the bootable media option

PS C:\> New-CMTaskSequenceMedia -BootableMediaOption -MediaInputType CDDVD -MediaPath "\\Contoso320\Users\Administrator.Contoso319DOM\Desktop\DD\111 - Copy (6).iso" -MediaMode Dynamic -ProtectPassword 0 -BootImageName "boot" -DistributionPointServerName "Contoso320.Contoso319DOM.NET" -ManagementnPointNetworkOperatingSystemPath "Contoso320.Contoso319DOM.NET"

This command creates task sequence media by specifying the BootableMediaOption parameter.

Example 4: Create task sequence media with the prestaged media option

PS C:\> New-CMTaskSequenceMedia -PrestagedMediaOption -MediaMode Dynamic -MediaPath "\\Contoso320\Users\Administrator.Contoso319DOM\Desktop\DD\2.wim"  -ProtectPassword 0 -TaskSequenceId "CCC0000B" -BootImageName "boot" -DistributionPointServerName "Contoso320.Contoso319DOM.NET" -ManagementnPointNetworkOperatingSystemPath "Contoso320.Contoso319DOM.NET" -OperatingSystemImageDistributionPointServerName "Contoso320.Contoso319DOM.NET" -TaskSequenceDistributionPointServerName "\\Contoso320.Contoso319DOM.NET"

This command uses the New-CMTaskSequenceMedia cmdlet to create task sequence media by specifying the PrestagedMediaOption parameter.

Required Parameters

-BootImage
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-BootImageDistributionPoint
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-BootImageDistributionPointServerName
Type:String
Aliases:DistributionPointServerName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-BootImageId

Specifies the ID of the boot image package associated with the task sequence media.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-BootImageManagementPoint
Type:IResultObject[]
Aliases:BootImageManagementPoints
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-BootImageManagementPointServerName
Type:String[]
Aliases:ManagementPointServerName, BootImageManagementPointServerNames
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-BootableMedia
Type:SwitchParameter
Aliases:BootableMediaOption
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CaptureMedia
Type:SwitchParameter
Aliases:CaptureMediaOption
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MediaInputType

Specifies a media input type. The acceptable values for this parameter are:

  • CDDVD
  • USB
Type:MediaInputType
Parameter Sets:Usb, CdDvd, Hd, Usb, CdDvd, Hd
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MediaMode

Specifies a media mode. The acceptable values for this parameter are:

  • Dynamic
  • SiteBased
Type:MediaMode
Parameter Sets:Dynamic, SiteBased, Dynamic, SiteBased
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MediaPath

Specifies a path to the media.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OperatingSystemImageDistributionPoint
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-OperatingSystemImageDistributionPointServerName

Specifies the name of a distribution point server for an operating system image.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrestagedMedia
Type:SwitchParameter
Aliases:PrestagedMediaOption, PrestageMedia
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProtectPassword

Indicates whether to protect the media with a password.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StandaloneMedia
Type:SwitchParameter
Aliases:StandAloneMediaOption
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TaskSequence
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-TaskSequenceDistributionPoint
Type:IResultObject[]
Aliases:TaskSequenceDistributionPoints
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-TaskSequenceDistributionPointServerName

Specifies an array of available distribution point servers for a task sequence.

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

Specifies an ID for a task sequence.

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

Optional Parameters

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

Indicates whether you allow unattended operating system deployment, which does not prompt for network configuration or optional task sequences.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Application
Type:IResultObject[]
Aliases:Applications
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ApplicationName

Specifies an array of names of applications included in the task sequence.

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

Specifies a name for a distribution point server from which the cmdlet acquires the package. The CommandPackageName parameter specifies the package name.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CommandIncludeFile

Indicates whether to include a file.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CommandPackage
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CommandPackageDistributionPoint
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CommandPackageName

Specifies a package name for the command specified by the CommandLine parameter.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Comment

Specifies a comment for a prestaged media file.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-CreateMediaSelfCertificate

Indicates whether the media includes a self-signed certificate. Use this parameter only in mixed-mode environments.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CreatedBy

Specifies the name of an individual or organization responsible for the creation of the prestaged media.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

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

Specifies a drive name.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DriverPackage
Type:IResultObject[]
Aliases:DriverPackages, PackageDriver, PackageDrivers
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-DriverPackageName
Type:String[]
Aliases:PackageDriverName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnablePrestartCommand

Indicates whether to enable a prestart command. A prestart command is a script or executable that runs before the task sequence.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableUnknownSupport

Indicates whether to provision unknown systems for operating system deployment.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExpirationDate

Specifies an expiration date, in D.HH:MM:SS format, for bootable media.

Type:DateTime
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

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

Specifies a password for an import certificate, as a secure string. An import certificate is a PKI-issued certificate added to the boot media for client authentication and communication with a System Center Configuration Manager site.

Type:SecureString
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ImportCertificatePath

Specifies a path for an import certificate to add to the boot media.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IncludeApplicationDependency
Type:Boolean
Aliases:IncludeApplicationDependencies
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MediaSize

Specifies the size of the media. The acceptable values for this parameter are:

  • None
  • Size4GB
  • Size650MB
  • Size8GB
  • SizeUnlimited
Type:MediaSize
Parameter Sets:None, Size650MB, Size4GB, Size8GB, SizeUnlimited
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OperatingSystemImageName

Specifies the name of an operating system image.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OperatingSystemImagePackage
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-OperatingSystemImagePackageId

Specifies the identifier of an operating system image package.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Package
Type:IResultObject[]
Aliases:Packages
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-PackageName

Specifies an array of package names.

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

Specifies a password, as a secure string.

Type:SecureString
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrestartCommandLine
Type:String
Aliases:CommandLine
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StartDate

Specifies a start date and time, in D.HH:MM:SS format.

Type:DateTime
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserDeviceAffinity

Specifies user device affinity. User device affinity associates users with a destination computer. The acceptable values for this parameter are:

  • AdministratorApproval
  • AutoApproval
  • DoNotAllow
Type:UserDeviceAffinityType
Parameter Sets:DoNotAllow, AdministratorApproval, AutoApproval
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Variable

Specifies a task sequence variable. The task sequence variable consists of a name and a value.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Version

Specifies the version information for the media.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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