The NetApp Community is moving to a new platform and is in Read-Only mode. Click to learn more.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

list fractional_reserve

JSHACHER11
5,811 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
5,811 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
5,812 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
5,811 Views

YES!

thank you

JGPSHNTAP
5,811 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
5,811 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
5,811 Views

did I just get a homework assignment 🙂

if I get some time to play with that cmdlet

Public