Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 236824

Re: Remove detached device using powershell scripts.

$
0
0

Ok, some of the possibilities.

 

1) All the LUNs in the text file

 

$luns=Get-Contentluns.txt
$luns|%{   $e01.storage.core.device.detached.remove($_) }
2) The first 5 LUNs

$e01.storage.core.device.detached.list() |
Select-First5|%{   $e01.storage.core.device.detached.remove($_) }
3) The last 5 LUNs

$e01
.storage.core.device.detached.list() |
Select-Last5|%{   $e01.storage.core.device.detached.remove($_) }
4) 5 randomly selected LUNs

$e01.storage.core.device.detached.list() |
Get-Random
-Count5|%{   $e01.storage.core.device.detached.remove($_) }

Viewing all articles
Browse latest Browse all 236824

Trending Articles