Removes or destroys the LUN from the storage system.
Syntax
Remove-EmcLun [-Lun] <ConcreteLun> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Description
Removes or destroys the LUN from the storage system. For VMAX systems, the Lun.CanDestroy property setting is not accurate, because it is always set to True in PowerShell, regardless of the provider setting. So do not depend on this parameter to be correct.
Parameters
-Lun <ConcreteLun>
Attributes: Required, Position: 1
Specifies the ESI LUN object, which you can get by using the ESI storage system object or by using the Get-EmcLun cmdlet. It is a positional parameter (position = 1).
-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>$p = Get-EmcStoragePool gold*
C:\PS>$l = New-EmcLun -Pool $p -Name esi_ps_test_1 -CapacityInMB 1024 -Silent
C:\PS>$l.ArrayLunId
14
C:\PS>Remove-EmcLun -Lun $l -Silent
Confirm
Are you sure you want to perform this action?
Performing operation "Remove-EmcLun" on Target "esi_ps_test_1".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
C:\PS>Get-EmcLUN esi_ps_test_1
WARNING: Unable to find lun(s) with the given parameters.
C:\PS>
The example creates a LUN and then destroys it.
-------------- Example 2 --------------
C:\PS>$l = Get-EmcLUN 7
C:\PS>$l.ArrayLunId
7
C:\PS>Remove-EmcLun -Lun $l -Silent -Force
C:\PS>Get-EmcLUN 7
WARNING: Unable to find lun(s) with the given parameters.
C:\PS>
This example gets a LUN and then removes it.