Share via


How to remove a virtual floppy disk from a virtual machine using cmdlet?

Question

Wednesday, August 8, 2012 3:26 AM

In PowerShell 3.0 (http://technet.microsoft.com/library/hh848559.aspx), there's no cmdlet to remove a VFD:

Remove-VM

Deletes the configuration file for a virtual machine.

Remove-VMDvdDrive

Deletes one or more virtual DVD Drives from a virtual machine (VM).

Remove-VMFibreChannelHba

Deletes a Fibre Channel host bus adapter from a virtual machine (VM) configuration.

Remove-VMHardDiskDrive

Deletes one or more virtual hard disk (VHD) drives from a virtual machine (VM).

Remove-VMMigrationNetwork

Deletes a network from the list of networks that can be used for virtual machine (VM) migration.

Remove-VMNetworkAdapter

Deletes one or more network adapters from a virtual machine (VM).

Remove-VMNetworkAdapterAcl

Deletes an access control list (ACL) applied to a virtual machine (VM) network adapter for traffic that is sent or received.

Remove-VMRemoteFx3dVideoAdapter

Deletes a RemoteFX adapter from a virtual machine (VM).

Remove-VMReplication

Delete the relationship for virtual machine (VM) Replication.

Remove-VMReplicationAuthorizationEntry

Deletes an authorization entry.

Remove-VMResourcePool

Deletes a resource pool.

Remove-VMSan

Deletes a virtual storage area network (VMSAN) from a Hyper-V host.

Remove-VMSavedState

Deletes the saved state of a saved virtual machine (VM).

Remove-VMScsiController

Deletes one or more SCSI controllers from a virtual machine (VM).

Remove-VMSnapshot

Deletes a snapshot or snapshot tree.

Remove-VMStoragePath

Deletes a path from a virtual machine (VM) storage resource pool.

Remove-VMSwitch

Deletes a virtual network.

Remove-VMSwitchExtensionPortFeature

Deletes a flow sheet document (FSD) from a network adapter.

Remove-VMSwitchExtensionSwitchFeature

Deletes a flow sheet document (FSD) from a vmswitch.

In WMI, there is a Msvm_DisketteDrive class. But all of its methods is "not supported": http://msdn.microsoft.com/en-us/library/cc136829%28v=vs.85%29.aspx.

How can I remove/detach a VFD from a VM?

All replies (2)

Thursday, August 9, 2012 2:18 AM âś…Answered

Hi,

It seems like that there is no direct command that could remove floppy disk, but I found that command set-vmfloppydiskdrive has a parameter -path, when it is set to $null, this means that the drive is set to contain no media.

In addition, hope below links be helpful:

Remove-SCVirtualFloppyDisk

http://systemscenter.ru/vmm2012cmdlets.en/Remove-SCVirtualFloppyDisk.html

http://www.ookii.org/post/floppy_support_in_windows_virtual_pc_7.aspx

Regards

Yan Li

TechNet Community Support


Thursday, August 9, 2012 2:34 AM

Hi,

It seems like that there is no direct command that could remove floppy disk, but I found that command set-vmfloppydiskdrive has a parameter -path, when it is set to $null, this means that the drive is set to contain no media.

In addition, hope below links be helpful:

Remove-SCVirtualFloppyDisk

http://systemscenter.ru/vmm2012cmdlets.en/Remove-SCVirtualFloppyDisk.html

http://www.ookii.org/post/floppy_support_in_windows_virtual_pc_7.aspx

Regards

Yan Li

TechNet Community Support

Thanks Yan Li. The command

Set-VMFloppyDiskDrive -VMName vm1 -Path $null

works!