Remove-SCVirtualFloppyDisk
Removes a virtual floppy disk object from VMM.
Syntax
Default (Default)
Remove-SCVirtualFloppyDisk
[-VirtualFloppyDisk] <VirtualFloppyDisk>
[-Force]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-SCVirtualFloppyDisk cmdlet removes a virtual floppy disk object from the Virtual Machine Manager (VMM) library and deletes the corresponding virtual floppy disk file (a Windows-based .vfd file or a VMware-based .flp file) from the library server.
If the virtual floppy disk is attached to a virtual machine, template, or hardware profile (and if you do not use the Force parameter), VMM lists the container that contains the virtual floppy disk and prompts you to confirm that you want to remove the virtual floppy disk:
If you reply Yes, VMM removes the association between the virtual floppy disk and the container to which it is attached, and then deletes the virtual floppy disk 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 a virtual floppy disk object from the library and delete the corresponding file
PS C:\> $VFD = Get-SCVirtualFloppyDisk -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -eq "BootFloppy.vfd" -and $_.LibraryServer.Name -eq "LibraryServer01.Contoso.com" }
PS C:\> Remove-SCVirtualFloppyDisk -VirtualFloppyDisk $VFD
The first command gets the virtual floppy disk file object named BootFloppy.vfd stored on LibraryServer01, and then stores the virtual floppy disk object in the $VFD variable.
The second command removes the floppy disk object stored in $VFD from the library and deletes the corresponding virtual floppy disk file from the library server.
Example 2: Remove multiple virtual floppy disks and their files
PS C:\> $VFDs = Get-SCVirtualFloppyDisk -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -match "Boot" }
PS C:\> $VFDs | Remove-SCVirtualFloppyDisk
The first command gets all virtual floppy disk objects whose names include the string "Boot" and stores these objects in the array named $VFDs.
The second command passes each virtual floppy disk object in $VFDs to the Remove-VirtualFloppyDisk cmdlet, which removes each virtual floppy disk object from the library. The command also deletes each corresponding file from the library server on which that virtual floppy disk is stored.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-VirtualFloppyDisk
Specifies a virtual floppy disk object.
Parameter properties
Type: | VirtualFloppyDisk |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Notes
- Requires a VMM virtual floppy disk object, which can be retrieved by using the Get-SCVirtualFloppyDisk cmdlet.