Compartir a través de


Remove-SCISO

Removes an ISO file from the VMM library.

Syntax

Remove-SCISO
      [-ISO] <ISO>
      [-Force]
      [-RunAsynchronously]
      [-PROTipID <Guid>]
      [-JobVariable <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-SCISO cmdlet removes an ISO file from the 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 specify 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.

Examples

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

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

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.

Example 2: Remove multiple ISO objects from the library

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

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-SCISO cmdlet, which removes each ISO object from the library and deletes the corresponding .iso file from the file system on the library server.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ISO

Specifies an ISO object.

Type:ISO
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-JobVariable

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Notes

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