Remove-SCHardwareProfile

Remove-SCHardwareProfile

Removes a hardware profile object from the VMM library.

構文

Parameter Set: Default
Remove-SCHardwareProfile [-HardwareProfile] <HardwareProfile> [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Remove-SCHardwareProfile cmdlet removes one or more hardware profile objects from the Virtual Machine Manager (VMM) library.

This cmdlet returns the object upon success, with the property MarkedForDeletion set to TRUE, or returns an error message upon failure.

パラメーター

-HardwareProfile<HardwareProfile>

Specifies a hardware profile object.

エイリアス

none

必須?

true

位置は?

1

既定値

none

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

True (ByValue)

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

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

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)。

入力

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

出力

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

  • This cmdlet requires a VMM hardware profile object, which can be retrieved by using the Get-SCHardwareProfile cmdlet.

Example 1: Remove a specific hardware profile from the library

The first command gets the hardware profile object named NewHWProfile01 from the VMM library, and then stores the object in the $HWProfile variable.

The second command deletes NewHWProfle01 from the library, prompting you for confirmation before completing the operation.

PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile01"}
PS C:\> Remove-SCHardwareProfile -HardwareProfile $HWProfile -Confirm

Example 2: Remove all hardware profiles without being prompted to confirm each deletion

This command gets all hardware profile objects in the library, and then passes each profile object to the Remove-SCHardwareProfile cmdlet by using the pipeline operator. That cmdlet removes each hardware profile. This command does not specify the Confirm parameter. The cmdlet does not confirm whether you want to delete these hardware profile objects.

PS C:\> Get-SCHardwareProfile | Remove-SCHardwareProfile

関連トピック

Get-SCHardwareProfile

New-SCHardwareProfile

Set-SCHardwareProfile