Remove-SCVirtualFloppyDisk
Remove-SCVirtualFloppyDisk
Removes a virtual floppy disk object from VMM.
構文
Parameter Set: Default
Remove-SCVirtualFloppyDisk [-VirtualFloppyDisk] <VirtualFloppyDisk> [-Force] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細説明
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.
パラメーター
-Force
Forces the operation to complete.
For example:
- Remove-SCSCVMHost -Force
Forces the removal of a host object from the VMM database.
- Stop-SCVirtualMachine -Force
Stops a virtual machine.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-PROTipID<Guid]>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-VirtualFloppyDisk<VirtualFloppyDisk>
Specifies a virtual floppy disk object.
エイリアス |
none |
必須? |
true |
位置は? |
1 |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-Confirm
コマンドレットを実行する前に、ユーザーに確認を求めます。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-WhatIf
コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
注
- This cmdlet requires a VMM virtual floppy disk object, which can be retrieved by using the Get-SCVirtualFloppyDisk cmdlet.
例
Example 1: Remove a virtual floppy disk object from the library and delete the corresponding file
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.
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
Example 2: Remove multiple virtual floppy disks and their files
The first command gets all virtual floppy disk objects whose names include the string Boot, and then stores these objects in the array named $VFDs.
The second command passes each virtual floppy disk object in $VFDs to the Remove-VirtualFloppyDisk cmdlet. This cmdlet 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.
PS C:\> $VFDs = Get-SCVirtualFloppyDisk -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -match "Boot" }
PS C:\> $VFDs | Remove-SCVirtualFloppyDisk