Hi,
i'm looking for a powercli script that will used the new ESXi 5.5 command : esxcli storage vmfs unmap -l command
the script should read the datastore list from csv file.
thanks,
Itay
Have a look at 1. Re: ESXcli 5.5 UNMAP and PowerCLI script?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Something like this may work, building off of Luc's suggestion. If this is for a single ESXi host and your CSV Datastore column name was "name"
connect-viserver -Server "hostname here"
$esxcli = Get-EsxCli -VMHost "hostname here"
$csv = Import-Csv c:\path\to\your.csv
foreach ($row in $csv) {
$esxcli.storage.vmfs.unmap(200, "$($row.name)", $null)
}