Set-SCVirtualFloppyDrive

Changes properties of a virtual floppy drive associated with a virtual machine, virtual machine template, or hardware profile used in VMM.

Syntax

Set-SCVirtualFloppyDrive
   [-VMMServer <ServerConnection>]
   [[-VirtualFloppyDrive] <VirtualFloppyDrive>]
   -VirtualFloppyDisk <VirtualFloppyDisk>
   [-JobGroup <Guid>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]
Set-SCVirtualFloppyDrive
   [-VMMServer <ServerConnection>]
   [[-VirtualFloppyDrive] <VirtualFloppyDrive>]
   [-NoMedia]
   [-JobGroup <Guid>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

The Set-SCVirtualFloppyDrive cmdlet changes one or more properties of a virtual floppy drive associated with a virtual machine, virtual machine template, or hardware profile used in a Virtual Machine Manager (VMM) environment.

You can use the Set-SCVirtualFloppyDrive cmdlet to configure the virtual floppy drive to use a physical floppy drive (typically, drive A:) to read physical floppy disks, to read an existing virtual floppy disk, or to disconnect the virtual floppy disk.

Examples

Example 1: Connect a virtual floppy drive to a virtual floppy disk

PS C:\> $FloppyDisk = Get-SCVirtualFloppyDisk -VMMServer "VMMServer01.Contoso.com" | where {$_.Name -eq "BootDisk.vfd"}
PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> $FloppyDrive = @(Get-SCVirtualFloppyDrive -VM $VM)
PS C:\> Set-SCVirtualFloppyDrive -VirtualFloppyDrive $FloppyDrive[0] -VirtualFloppyDisk $FloppyDisk

The first command gets the virtual floppy disk object named BootDisk.vfd from VMMServer01 and stores the object in the $FloppyDisk variable.

The second command gets the virtual machine object named VM01 and stores the object in the $VM variable.

The third command gets the virtual floppy drive object on VM01 and stores the virtual floppy drive object in the $FloppyDrive object array (in the event there is more than one virtual floppy drive object, the array stores all of the objects).

The last command connects the virtual floppy disk stored in $FloppyDisk (BootDisk.vfd) to the first virtual floppy drive on VM01.

Example 2: Disconnect a virtual floppy drive

PS C:\> $VM = Get-SCVirtualMachine -Name "VM02"
PS C:\> $FloppyDrive = @(Get-SCVirtualFloppyDrive -VM $VM)
PS C:\> Set-SCVirtualFloppyDrive -VirtualFloppyDrive $FloppyDrive[0] -NoMedia

The first command gets the virtual machine object named VM02 and stores the object in the $VM variable.

The second command gets the virtual floppy drive object on VM02 and stores the object in $FloppyDrive.

The last command disconnects the virtual floppy drive object stored in $FloppyDrive from any host drive or virtual floppy disk to which it was connected by specifying the NoMedia parameter. This command also deletes any virtual floppy disk that the virtual floppy drive used earlier if no other virtual machine currently uses that virtual floppy disk.

Required Parameters

-NoMedia

Disconnects a virtual DVD drive from the host drive or ISO to which it was connected, or disconnects a virtual floppy drive from the host drive or virtual floppy disk to which it was connected.

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

Specifies a virtual floppy disk object.

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

Optional Parameters

-JobGroup

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:False
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
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
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
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VirtualFloppyDrive

Specifies a virtual floppy drive object.

Type:VirtualFloppyDrive
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

VirtualFloppyDrive

This cmdlet returns a VirtualFloppyDrive object.

Notes

  • Requires a VMM virtual floppy drive object, which can be retrieved by using the Get-SCVirtualFloppyDrive cmdlet.