hi,
i've a maybe dumb questions but i can't find a solution for.
i'm trying to get the fractional reserve setting of all my volumes. As far as i got:
Get-NaVolOption vol_name
returns all options set on the volume. but every try to just get the fractional reserve option failed. finally i came out with something like:
Get-NaVol vol_* | % { $string = $_.name + "|" + (get-navoloption $_)[6]; write-host $string}
i can't believe it's not possible to do address the properties by name like:
Get-NAVolOption -Name vol_name -Option fractional_reserve
or
$options = Get-NAVolOption -Name vol_name
Write-Host $options["fractional_reserve"]
Can i ALWAYS rely on fractional reserve property being the 6th value in the array? can this change? (as far as i've seen on all of my volumes the fractional reserve setting is always the 6th value)
wouldn't it be easier to return not an System.Array but an System.collections.hashtable?
(workaround or me:
$options = Get-NAVolOption -Name vol_name
$hashoptions = @{}
$options | %{ $hashoptions.Add($_.name,$_.value)}
write-host $hashoptions.fractional_reserve
)...
BG Christoph