Hi Luc ,
if you can check the following
i am looking to check each datasore for .iso file .i dont think there is direct way of doing this .can you please check the folowing script if this works fine ??
$datastoresFR=get-datastore
$count=$datastoresFR.count
foreach($d in $datastoresFR)
{
$ds=get-datastore -name $d
for ($i=0; $i -le $count ; $i++)
{
New-PSDrive -Location $ds -Name DS[$i] -PSProvider VimDatastore -Root '\' | Out-Null
Set-Location DS[$i]:\
$isofile=Get-ChildItem *.iso
if($isofile.count -ge "1")
{
write-host "there are/is .iso files stored in " $ds.name
$isofile
Remove-PSDrive -Name DS[$i] -Confirm:$false
}
}
}