Remove-SCISO

Applies To: System Center 2012 - Virtual Machine Manager

Remove-SCISO

Removes an ISO file from the VMM library.

Syntax

Parameter Set: Default
Remove-SCISO [-ISO] <ISO> [-Force] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Detailed Description

The Remove-SCISO cmdlet removes an ISO file from the System Center Virtual Machine Manager (VMM) library and deletes the ISO file on the library server.

If the ISO is attached to a virtual machine, template, or hardware profile (and if you do not use the Force parameter), VMM lists the container that includes the ISO and prompts you to confirm that you want to remove the ISO:

- If you reply Yes, VMM removes the association between the ISO and

the container to which it is attached, and then deletes the ISO

object from VMM.

- If you reply No, the operation is cancelled.

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-SCISO, type: "Get-Help Remove-SCISO -online".

Parameters

-Force

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ISO<ISO>

Specifies an ISO object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-JobVariable<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Notes

  • Requires a VMM ISO object, which can be retrieved by using the Get-SCISO cmdlet.

Examples

1: Remove an ISO object and delete the corresponding .iso file.

The first command gets the ISO object named OsISO.iso from LibraryServer01 and stores the ISO object in the $ISO variable.

The second command removes the ISO object from the library and deletes the corresponding .iso file from the file system on the library server.

PS C:\> $ISO = Get-SCISO -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -eq "OsISO.iso" -and $_.LibraryServer.Name -eq "LibraryServer01.Contoso.com" }
PS C:\> Remove-SCISO -ISO $ISO

2: Remove multiple ISO objects from the library.

The first command gets all ISO objects whose name includes the string "OsISO" and stores these ISO objects in the $ISOs variable.

The second command passes each ISO object in $ISOs to the Remove-ISO cmdlet, which removes each ISO object from the library and deletes the corresponding .iso file from the file system on the library server.

PS C:\> $ISOs = Get-SCISO -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -match "OsISO" }
PS C:\> $ISOs | Remove-SCISO

Get-SCISO

Set-SCISO