New-CMCaptureMedia
Creates capture media.
Syntax
New-CMCaptureMedia
[-AllowUacPrompt]
-BootImage <IResultObject>
-DistributionPoint <IResultObject[]>
[-Force]
[-FormatMedia]
[-SiteCode <String>]
-MediaType <MediaInputType>
[-NoAutoRun]
-Path <String>
[-TemporaryFolder <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-CMCaptureMedia cmdlets creates media used to capture an operating system deployment image from a reference computer.
NOTE: This cmdlet requires elevated permissions to run.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>
. For more information, see getting started.
Examples
Example 1: Create capture media
PS XYZ:\> $BootImage = Get-CMBootImage -Name "Boot image (x64)"
PS XYZ:\> $DistributionPoint = Get-CMDistributionpoint -SiteCode CM1
PS XYZ:\> New-CMCaptureMedia -MediaType CdDvd -Path "\\server\share\CaptureMedia.iso" -BootImage $BootImage -DistributionPoint $DistributionPoint
The first command gets the boot image object named Boot image (x64) and stores the object in the $BootImage 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 capture media using the BootImage stored in $BootImage, and the distribution point stored in $DistributionPoint.
Parameters
-AllowUacPrompt
Indicates that User Account Control (UAC) prompts are allowed.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BootImage
Specifies a boot image object. To obtain a boot image object, use the Get-CMBootImage cmdlet.
Type: | IResultObject |
Aliases: | BootImagePackage |
Position: | Named |
Default value: | None |
Required: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableWildcardHandling
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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 |
Required: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MediaType
Specifies the media mode. Valid values are:
- Usb
- CdDvd
- Hd
Type: | MediaInputType |
Accepted values: | Usb, CdDvd |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NoAutoRun
Use this parameter to configure the following option from the create task sequence media wizard: Include autorun.inf file on media
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SiteCode
{{ Fill SiteCode Description }}
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TemporaryFolder
{{ Fill TemporaryFolder Description }}
Type: | String |
Aliases: | TemporaryDirectory, StagingArea |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet doesn't run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
System.Object