Share via


Set-SCVirtualFloppyDrive

Set-SCVirtualFloppyDrive

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

Syntax

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

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

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

Parameters

-JobGroup<Guid]>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualFloppyDisk<VirtualFloppyDisk>

Specifies a virtual floppy disk object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualFloppyDrive<VirtualFloppyDrive>

Specifies a virtual floppy drive object.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • VirtualFloppyDrive

Notes

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

Examples

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

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

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

The third command gets the virtual floppy drive object on VM01, and then 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 will store all of the objects.

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

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

Example 2: Disconnect a virtual floppy drive

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

The second command gets the virtual floppy drive object on VM02, and then 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.

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

Get-SCVirtualFloppyDisk

Get-SCVirtualFloppyDrive

Get-SCVirtualMachine