$E01 = get-esxcli -vmhost test01
$ED01 = $e01.storage.core.device.detached.list() # I have 10 devices here
$e01.storage.core.device.detached.remove($ED01) error as follows
PowerCLI C:\scripts> $e01.storage.core.device.detached.remove($ed01)
A specified parameter was not correct.
method
At line:1 char:41
+ $e01.storage.core.device.detached.remove <<<< ($ed01)
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodInvocationException
how to loop the list of devices in detached list that needs to be removed,