Microsoft Virtualization Discussions

list fractional_reserve

JSHACHER11
3,856 Views

Hi guys,

I am trying to get a list of volumes with FR enabled (100%)

this did not get me anywhere:

Get-navol | Get-NaVolOption | where {$_.name -like "fractional_reserve" -and $_.value -eq "100"} | select name | ft -Autosize

any ideas?

Thank you

1 ACCEPTED SOLUTION

billyd
3,856 Views

This worked for me:

$vol = get-navol | select name;foreach ($v in $vol){get-navoloption -name $v.Name | where-object {$_.Name -eq "fractional_reserve" -and $_.Value -eq "100"} | select @{n="Volume";e={$v.Name}},name,value}

View solution in original post

5 REPLIES 5

billyd
3,857 Views

This worked for me:

$vol = get-navol | select name;foreach ($v in $vol){get-navoloption -name $v.Name | where-object {$_.Name -eq "fractional_reserve" -and $_.Value -eq "100"} | select @{n="Volume";e={$v.Name}},name,value}

JSHACHER11
3,856 Views

YES!

thank you

JGPSHNTAP
3,856 Views

I had some time to play with this as well

Let me know if this works with the same results

get-navol | % {

if (get-navoloption $_.name | ? {$_.name -eq "fractional_reserve" -and $_.value -eq "100"}) {

write-host $_.name

}

}

I'm not building a select statement with expressions, but im curious to see if this is the same result


JSHACHER11
3,856 Views

Yup. that worked too

Josh, if you have time this weekend see what what you can do about that:

https://communities.netapp.com/message/131469#131469

cheers

JGPSHNTAP
3,856 Views

did I just get a homework assignment 🙂

if I get some time to play with that cmdlet

Public