Remove-SCHardwareProfile

Removes a hardware profile object from the VMM library.

Description

The Remove-SCHardwareProfile cmdlet removes one or more hardware profile objects from the System Center 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.

For more information about Remove-SCHardwareProfile, type: "Get-Help Remove-SCHardwareProfile -online".

Parameters

HardwareProfile

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a hardware profile object.

Confirm

Required? false
Accept Pipeline Input? false
Position? named
Prompts for confirmation before running the command.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 
Requires a VMM hardware profile object, which can be retrieved by using the Get-SCHardwareProfile cmdlet.

Examples

1: Remove a specific hardware profile from the library.
PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile01"}
PS C:\> Remove-SCHardwareProfile -HardwareProfile $HWProfile -Confirm
The first command gets the hardware profile object named NewHWProfile01 from the VMM library and stores the object in the $HWProfile variable.

The second command deletes NewHWProfle01 from the library, prompting the user for confirmation before completing the operation.
2: Remove all hardware profiles without being prompted to confirm each deletion.
PS C:\> Get-SCHardwareProfile | Remove-SCHardwareProfile
This command gets all hardware profile objects in the library and passes each profile object to the Remove-SCHardwareProfile cmdlet, which removes each hardware profile. By not using the Confirm parameter, you will not be prompted to confirm whether you want to delete these hardware profile objects.

See Also