Remove-SCCustomResource

Removes a custom resource from the VMM library.

Description

The Remove-SCCustomResource cmdlet removes a custom resource from the VMM library.

For more information about custom resources, type: "Get-Help Set-SCCustomResource".

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

Parameters

CustomResource

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a custom resource object.

Confirm

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

Force

Required? false
Accept Pipeline Input? false
Position? named
Forces the operation to complete. 

For example:
- Remove-SCSCVMHost -Force
  Forces the removal of a host object from the VMM database.

- Stop-SCVirtualMachine -Force
  Stops a virtual machine.

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. 

Examples

1: Remove a custom resource.
PS C:\> $CR = Get-SCCustomResource -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -eq “Folder.CR” -and $_.LibraryServer.Name -eq "LibraryServer01.Contoso.com” }
PS C:\> Remove-SCCustomResource -CustomResource $CR
The first command gets the custom resource object named Folder.CR on LibraryServer01 from the VMM library on VMMServer01 and then stores the object in the $CR variable.

The second command removes the custom resource stored in $CR from the VMM library.

See Also