New-CMStandaloneMedia

Creates stand-alone media.

Syntax

New-CMStandaloneMedia
   [-DriverPackage <IResultObject[]>]
   [-Application <IResultObject[]>]
   [-Package <IResultObject[]>]
   [-MediaStartDate <DateTime>]
   [-MediaExpirationDate <DateTime>]
   [-IncludeApplicationDependency]
   [-MediaSize <MediaSize>]
   -TaskSequence <IResultObject>
   [-AllowUacPrompt]
   [-AllowUnattended]
   [-CertificatePath <String>]
   -DistributionPoint <IResultObject[]>
   [-Force]
   [-FormatMedia]
   [-MediaPassword <SecureString>]
   -MediaType <MediaInputType>
   -Path <String>
   [-PrestartCommand <String>]
   [-PrestartPackage <IResultObject>]
   [-ProviderCredential <PSCredential>]
   [-Variable <Hashtable>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-CMStandaloneMedia cmdlet creates media used to deploy operating systems without network access.

NOTE: This cmdlet requires elevated permissions to run.

Examples

Example 1: Create stand-alone media using variables

PS C:\> $TaskSequence = Get-CMTaskSequence -Name "TaskSequence01"
PS C:\> $DistributionPoint = Get-CMDistributionpoint -SiteCode CM1
PS C:\> New-CMStandaloneMedia -MediaType CdDvd -Path \\server\share\standaloneMedia.iso -TaskSequence $TaskSequence -DistributionPoint $DistributionPoint

The first command gets the task sequence object named TaskSequence01 and stores the object in the $TaskSequence variable.

The second command gets the distribution point object for the site code named CM1 and stores the object in the $DistributionPoint variable.

The last command creates stand-alone media using the task sequence stored in $TaskSequence and the distribution point stored in $DistributionPoint.

Required Parameters

-DistributionPoint

Specifies an array of distribution point objects. To obtain a distribution point object, use the Get-CMDistributionPoint cmdlet.

Type:IResultObject[]
Aliases:DistributionPoints
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MediaType

Specifies the media type. Valid values are:

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

Specifies the name and path where the output files are written.

Type:String
Aliases:MediaPath, OutputPath, DriveName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TaskSequence

Specifies a task sequence object. To obtain a task sequence object, use the Get-CMTaskSequence cmdlet.

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

Optional Parameters

-AllowUacPrompt

Indicates that User Account Control (UAC) prompts are allowed.

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

Indicates that unattended operating system deployments are allowed. An unattended operating system deployment does not prompt for network configuration or optional task sequences.

Type:SwitchParameter
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:False
Accept wildcard characters:False
-CertificatePath

Specifies a path from which to import a PKI certificate.

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
-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
-DriverPackage
Type:IResultObject[]
Aliases:DriverPackages, PackageDriver, PackageDrivers
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
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
-FormatMedia

Indicates that the cmdlet formats the removable USB drive (FAT32), and makes it bootable.

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

Indicates that the cmdlet detects associated application dependencies and adds them to this media.

Type:SwitchParameter
Aliases:IncludeApplicationDependencies
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MediaExpirationDate
Type:DateTime
Aliases:Expiration
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MediaPassword

Specifies, as a secure string, a password to protect task sequence media.

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

Specifies the size of the media. Valid values are:

  • None
  • Size4GB
  • Size8GB
  • Size650MB
  • SizeUnlimited
Type:MediaSize
Parameter Sets:None, Size650MB, Size4GB, Size8GB, SizeUnlimited
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MediaStartDate
Type:DateTime
Aliases:Start
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:False
Accept wildcard characters:False
-PrestartCommand

Specifies a prestart command that will run before the task sequence runs. A prestart command is a script or an executable that can interact with the user in Windows PE before the task sequence runs to install the operating system.

Type:String
Aliases:PreExecCommandLine
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrestartPackage

Specifies a package object that contains files for the prestart command. To obtain a package object, use the Get-CMPackage cmdlet.

Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProviderCredential
Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Variable

Specifies a task sequence variable. A task sequence variable is a name/value pair that is used during the task sequence deployment.

Type:Hashtable
Aliases:TaskSequenceVariables, Variables
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