New-CMTaskSequence

New-CMTaskSequence

Creates a task sequence.

構文

Parameter Set: NewBuildOSImage
New-CMTaskSequence -BootImagePackageId <String> -BuildOperatingSystemImageOption -JoinDomain <JoinType> {DomainType | WorkgroupType} -OperatingSystemFileAccount <String> -OperatingSystemFilePath <String> -OperatingSystemImageIndex <UInt32> -OperatingSystemImagePackageId <String> -TaskSequenceName <String> [-ApplicationName <String[]> ] [-ApplyAllImages <Boolean> ] [-ClientPackagePackageId <String> ] [-CreatedBy <String> ] [-DomainAccount <String> ] [-DomainName <String> ] [-DomainOrganizationUnit <String> ] [-DomainPassword <SecureString> ] [-GeneratePassword <Boolean> ] [-IgnoreInvalidApplication <Boolean> ] [-ImageDescription <String> ] [-ImageVersion <String> ] [-InstallationLicensingMode <ServerLicensingMode> {NonSpecify | PerSeat | PerServer} ] [-InstallationProductkey <String> ] [-InstallationProperty <String> ] [-LocalAdminPassword <SecureString> ] [-MaximumServerConnection <Int32> ] [-OperatingSystemFileAccountPassword <SecureString> ] [-SoftwareUpdateStyle <SoftwareUpdateStyleType> {All | Mandatory | NoInstall} ] [-SystemPreparationPackageId <String> ] [-TaskSequenceDescription <String> ] [-WorkgroupName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewCustom
New-CMTaskSequence -CustomOption -TaskSequenceName <String> [-BootImagePackageId <String> ] [-TaskSequenceDescription <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewInstallOSImage
New-CMTaskSequence -BootImagePackageId <String> -InstallOperatingSystemImageOption -JoinDomain <JoinType> {DomainType | WorkgroupType} -OperatingSystemImageIndex <UInt32> -OperatingSystemImagePackageId <String> -TaskSequenceName <String> [-ApplicationName <String[]> ] [-ApplyAllImages <Boolean> ] [-CaptureLocallyUsingLinks <Boolean> ] [-CaptureNetworkSetting <Boolean> ] [-CaptureUserSetting <Boolean> ] [-CaptureWindowsSetting <Boolean> ] [-ClientPackagePackageId <String> ] [-ConfigureBitLocker <Boolean> ] [-DomainAccount <String> ] [-DomainName <String> ] [-DomainOrganizationUnit <String> ] [-DomainPassword <SecureString> ] [-GeneratePassword <Boolean> ] [-IgnoreInvalidApplication <Boolean> ] [-InstallationLicensingMode <ServerLicensingMode> {NonSpecify | PerSeat | PerServer} ] [-InstallationProductkey <String> ] [-InstallationProperty <String> ] [-LocalAdminPassword <SecureString> ] [-PartitionAndFormatTarget <Boolean> ] [-SaveLocally <Boolean> ] [-SoftwareUpdateStyle <SoftwareUpdateStyleType> {All | Mandatory | NoInstall} ] [-TaskSequenceDescription <String> ] [-UserStateMigrationToolPackageId <String> ] [-WorkgroupName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewInstallOSImageVhd
New-CMTaskSequence -BootImagePackageId <String> -InstallOperatingSystemImageVhdOption -JoinDomain <JoinType> {DomainType | WorkgroupType} -OperatingSystemImageIndex <UInt32> -OperatingSystemImagePackageId <String> -TaskSequenceName <String> [-ApplicationName <String[]> ] [-ApplyAllImages <Boolean> ] [-ClientPackagePackageId <String> ] [-ConfigureBitLocker <Boolean> ] [-DomainAccount <String> ] [-DomainName <String> ] [-DomainOrganizationUnit <String> ] [-DomainPassword <SecureString> ] [-GeneratePassword <Boolean> ] [-IgnoreInvalidApplication <Boolean> ] [-InstallationLicensingMode <ServerLicensingMode> {NonSpecify | PerSeat | PerServer} ] [-InstallationProductkey <String> ] [-InstallationProperty <String> ] [-LocalAdminPassword <SecureString> ] [-PartitionAndFormatTarget <Boolean> ] [-TaskSequenceDescription <String> ] [-WorkgroupName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The New-CMTaskSequence cmdlet creates a Microsoft System Center 2012 Configuration Manager task sequence. A task sequence performs multiple steps or tasks on a System Center 2012 Configuration Manager client computer without user intervention.

パラメーター

-ApplicationName<String[]>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ApplyAllImages<Boolean>

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-BootImagePackageId<String>

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

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-BuildOperatingSystemImageOption

Indicates that the task sequence builds and captures a reference operating system image from a set of operating system installation files.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CaptureLocallyUsingLinks<Boolean>

Indicates whether Configuration Manager stores the captured data locally on the destination computer. The links that Configuration Manager uses to store the user state locally are referred to as hard-links.

Hard-links is a User State Migration Tool (USMT) 4.0 feature that scans the computer for user files and settings and then creates a directory of hard-links to those files. The hard-links are then used to restore the user data after the new operating system is deployed.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CaptureNetworkSetting<Boolean>

Indicates whether the task sequence captures network settings from the computer that runs the task sequence.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CaptureUserSetting<Boolean>

Indicates whether the task sequence captures the user state. If you specify this parameter, specify the UserStateMigrationToolPackageId parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CaptureWindowsSetting<Boolean>

Indicates whether the task sequence captures Windows settings from the computer that runs the task sequence. You can capture the computer name, registered user and organization name, and the time zone settings.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ClientPackagePackageId<String>

Specifies the ID of the Configuration Manager client package to install on the destination computer.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ConfigureBitLocker<Boolean>

Indicates whether the task sequence enables BitLocker encryption on the hard drive.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CreatedBy<String>

Specifies the name of the user that created the operating system image that the task sequence captures.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CustomOption

Indicates that the cmdlet creates a custom task sequence.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-DomainAccount<String>

Specifies an account, in the format Domain\User, that has permissions necessary to join the computer to the domain.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-DomainName<String>

Specifies a domain name. Include this parameter to have the target computer join the specified domain.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-DomainOrganizationUnit<String>

Specifies the Lightweight Directory Access Protocol (LDAP) path for an organizational unit (OU) for the computer to join. Use the following format: LDAP//OU=computers, DC=Contoso.com, C=com. Specify an OU in the domain that you specified in the DomainName parameter.

If the computer is already a member of some other OU, Active Directory Domain Services (AD DS) does not allow you to change the OU and this setting is ignored.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-DomainPassword<SecureString>

Specifies the password, as a secure string, for the user account that you specified for the DomainAccount parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-GeneratePassword<Boolean>

Indicates whether Configuration Manager randomly generates a password for the local administrator account in the new operating system.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-IgnoreInvalidApplication<Boolean>

Indicates whether the task sequence step continues if an individual application installation fails.

If you specify this parameter, the task sequence continues regardless of any installation errors. If you do not specify this parameter, the task sequence step will end immediately when an installation fails.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ImageDescription<String>

Specifies a description of the operating system image that the task sequence captures.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ImageVersion<String>

Specifies the version of the operating system that the task sequence captures.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-InstallationLicensingMode<ServerLicensingMode>

Specifies the Windows Server license mode that the task sequence uses. Valid values are:

-- NonSpecify
-- PerSeat
-- PerServer

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-InstallationProductkey<String>

Specifies the Windows product key.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-InstallationProperty<String>

Specifies Configuration Manager client installation properties.

Site assignment and the default configuration are automatically specified by the task sequence action. You can use this field to specify any additional installation properties to use when you install the client. To enter multiple installation properties, separate them with a space. If a property contains spaces, surround it by quotation marks ("").

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-InstallOperatingSystemImageOption

Indicates that the task sequence installs an existing image option.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-InstallOperatingSystemImageVhdOption

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-JoinDomain<JoinType>

Specifies the destination computer to add to a workgroup or domain. Valid values are:

-- DomainType
-- WorkgroupType

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-LocalAdminPassword<SecureString>

Specifies the local administrator password, as a secure string, for the destination computer.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-MaximumServerConnection<Int32>

Specifies the maximum number of server connections. Specify this parameter if you specify PerServer for the InstallationLicensingMode parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-OperatingSystemFileAccount<String>

Specifies the Windows account that has permissions to the network share that you specify in the OperatingSystemFilePath parameter.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-OperatingSystemFileAccountPassword<SecureString>

Specifies the password, as a secure string, for the account that you specify in the OperatingSystemFileAccount parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-OperatingSystemFilePath<String>

Specifies the file system pathname to the location that Configuration Manager uses when it stores the captured operating system image.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-OperatingSystemImageIndex<UInt32>

Specifies the index of the operating system image to install. Specify this parameter if the operating system image package has multiple images.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-OperatingSystemImagePackageId<String>

Specifies the ID of the package that contains the operating system image to install.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-PartitionAndFormatTarget<Boolean>

Indicates whether the task sequence partitions and formats the destination computer before the operating system is installed.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-SaveLocally<Boolean>

Indicates whether Configuration Manager clients download the full image to a local cache before the task sequence runs. This parameter has been deprecated.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-SoftwareUpdateStyle<SoftwareUpdateStyleType>

Specifies whether the task sequence installs all updates or only mandatory updates for the destination computers that receive the task sequence. Valid values are:

-- All
-- Mandatory
-- NoInstall

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-SystemPreparationPackageId<String>

Specifies the ID of the Configuration Manager package that contains the appropriate version of Sysprep to use to capture the reference computer settings.

If the operating system version that you are running is Windows Vista or later, Sysprep is automatically installed on the computer and you do not have to specify a package. If the operating system version that you are running is Windows XP SP3 or Windows Server 2003 SP2, you must specify a package that contains the version of Sysprep and its support files that is appropriate for that operating system version. This package does not require a program. Configuration Manager uses the Sysprep files contained in the package.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-TaskSequenceDescription<String>

Specifies a description for the task sequence.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-TaskSequenceName<String>

Specifies a name for the task sequence.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-UserStateMigrationToolPackageId<String>

Specifies the ID of the USMT package.

To store the user state data locally or on a state migration point, you must create a package that contains the USMT source files that you want to use.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-WorkgroupName<String>

Specifies the name of a workgroup. Specify this parameter if you specified WorkgroupType for the JoinDomain parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

Example 1: Create a task sequence that installs the operating system from a boot image

This command creates a task sequence named TaskSeq01 that uses the boot image package that has the ID CM200002.

The command specifies the CustomOption parameter to indicate a custom task sequence.

PS C:\> New-CMTaskSequence -CustomOption -BootImagePackageID "CM200002" -TaskSequenceName "TaskSeq01" -TaskSequenceDescription "Custom task sequence 22" 

Example 2: Create a task sequence that builds the operating system image

This command creates a task sequence named BuildOStask01. The task sequence uses the boot image package that has the ID CM200002 to build an operating system image from a set of operating system installation files in the operating system image package that has the ID CM20000D.

PS C:\> New-CMTaskSequence -BuildOperatingSystemImageOption -BootImagePackageId "CM200002" -TaskSequenceName "BuildOStask01" -OperatingSystemImagePackageId "CM20000D" -OperatingSystemImageIndex "1" -JoinDomain WorkgroupType  -WorkgroupName "Midwest" -OperatingSystemFilePath "\\btc-dist-08\Public\CM\AdminTeam\OpSys01\nodesc_boot.wim" -OperatingSystemFileAccount "Contoso\Primeos" -OperatingSystemFileAccountPassword "Basket11"

Example 3: Create a task sequence that installs the operating system image

This command creates a task sequence that uses the boot image package that has the ID CM200002 to install an operating system image from the operating system image package that has the ID CM20000D.

PS C:\> New-CMTaskSequence -InstallOperatingSystemImageOption -BootImagePackageId "CM200002" -TaskSequenceName "InstallOStask01" -OperatingSystemImagePackageId "CM20000D" -OperatingSystemImageIndex "1" -JoinDomain WorkgroupType  -WorkgroupName "Midwest" -UserStateMigrationToolPackageID "CM200001" -InstallationProductkey "TWB3K-HKMBK-HXRBD-TQGK9-VJRMG"

関連トピック

Enable-CMTaskSequence

Get-CMTaskSequence

Import-CMTaskSequence

Set-CMTaskSequence

Disable-CMTaskSequence

Remove-CMTaskSequence

New-CMTaskSequenceMedia