Microsoft Virtualization Discussions

foreach

JSHACHER11

why is this isn't working:

$volumes = Get-Content c:\vol_list.txt

foreach ($vol in $volumes) Get-NaVolAutosize $vol | select name,isenabled | ft

cheers

1 ACCEPTED SOLUTION

vinith

I gues you missed the curly braces ?

$volumes = Get-Content c:\vol_list.txt

foreach ($vol in $volumes)

{

  Get-NaVolAutosize $vol | select @{l='VolumeName';e={$vol}},isenabled | ft

}

View solution in original post

3 REPLIES 3

vinith

I gues you missed the curly braces ?

$volumes = Get-Content c:\vol_list.txt

foreach ($vol in $volumes)

{

  Get-NaVolAutosize $vol | select @{l='VolumeName';e={$vol}},isenabled | ft

}

View solution in original post

JSHACHER11

I guess you missed the curly braces ?

I guess I have..

cheers

JGPSHNTAP

Joel - i'll dig around for something I wrote that will inventory all this in excel... and it will tell you the min and max

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public