Compartilhar via


Set-SCVirtualFloppyDrive

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

Syntax

VirtualFloppyDisk

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

NoMedia

Set-SCVirtualFloppyDrive
    [[-VirtualFloppyDrive] <VirtualFloppyDrive>]
    [-VMMServer <ServerConnection>]
    [-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.

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.

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

-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

-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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NoMedia
Position:Named
Mandatory:True
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

VirtualFloppyDisk
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualFloppyDrive

Specifies a virtual floppy drive object.

Parameter properties

Type:VirtualFloppyDrive
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
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.

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.