Remove-EmcFileBasedDisk

Deletes a file-based disk from a hypervisor.

 

Syntax

Remove-EmcFileBasedDisk -Hypervisor <IHypervisor> -Path <String> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]

 

Parameters

-Hypervisor <IHypervisor>

Attributes: Required, Position: named

Specifies the ESI hypervisor host system object, which you can get from the host system by using the Get-EmcHostSystem cmdlet. You can add a hypervisor to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets.

 

-Path <String>

Attributes: Required, Position: named

Specifies the path of the file-based disk.

 

-Force <SwitchParameter>

Attributes: Optional, Position: named

Allows the cmdlet to continue without asking for user confirmation.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

Turns off all the informational and verbose messages. However, it still displays errors.

 

-WhatIf <SwitchParameter>

Attributes: Optional, Position: named

Shows what would happen if the cmdlet runs. The cmdlet is not run.

 

-Confirm <SwitchParameter>

Attributes: Optional, Position: named

Prompts you for confirmation before executing the command.

 

<CommonParameters>

This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. Type get-help about_commonparameters for more details.

 

Examples

-------------- Example 1 --------------

C:\PS>$hypervisor = Get-EmcHostSystem *133

C:\PS>New-EmcFileBasedDisk -Hypervisor $hypervisor  -Size 1GB -HostDiskType fIXeD -Path "E:\hyper-V\testESI.vhd"

C:\PS>Remove-EmcFileBasedDisk -Hypervisor $hypervisor  -Path "E:\hyper-V\testESI.vhd"

This example deletes a file-based disk from a hypervisor.

 

------------- Example 2 --------------

C:\PS>$h= Get-EmcHostSystem *99

C:\PS>New-EmcFileBasedDisk -Hypervisor $h -Size 1GB  -Path "[datastore1] VM-ESX-WS2K8R2-1/ESIQA.vmdk"

C:\PS>Remove-EmcFileBasedDisk -Hypervisor $h  -Path  "[datastore1] VM-ESX-WS2K8R2-1/ESIQA.vmdk"

This example deletes a file-based disk from a VMWare host.