Ok, so let me address a few issues here First, you shouldn't be importing the module every time you run the script. You should add it to your profile. And someone mentioned to me that the module will load automatically in 3.0, but i haven't tested that. Look up Powershell profiles. First, you should eliminate all the Write-host "" You should use something like Write-Host "`n`nCheck the new size:`n`n" -foregroundcolor yellow Also, as stated in previous email, you should be using the convertto-formattednumber cmdlet in place of - Expression={[math]::truncate($_.Available/1gb)}}, It's a custom Dataontap module cmdlet that will help with other future scripts As for your loop. you need to focus on something like Do.... Until. something like Do { $ans = Read-Host -prompt "Would you like to increase one of the volumes? [Y/N]" write-host "" write-host "" if ($ans -eq "N") { exit } else { $vol = Read-Host "Enter volume name" $size = Read-Host "How much more space do you want to give it? (example: +100g)" Set-NaVolsize -Name $vol -NewSize $size -Confirm Write-Host "" Write-Host "" Write-Host "Check the new size:" -foregroundcolor yellow Write-Host "" Write-Host "" Get-NaVol -Name $vol | select name,used,@{Name="Available Size (in GB)";Expression={[math]::truncate($_.Available/1gb)}},@{Name="Total Size (in GB)";Expression={[math]::truncate($_.sizetotal/1gb)}} } } Until ( $ans -eq "N") Enjoy!
... View more
Wow.. I have no idea what you are trying to accomplish.. This script is all over the place man... Take a look at the multi report i sent you for reporting.. Do you have onCommand installed?
... View more
Yah.. Functions are not what you are after.. That is not the proper way to do thing in my opinion for this For piping directly to snapmirror status get-navol | get-nasnapmirror
... View more
As far as piping them to snapmirror status, you can either pipe them to snapmirror status, or create custom objects and then work that why. I'm curious, why are you using a function?
... View more
I think this can be done with custom scripting based on dfm. We currently do this for aggregates with custom powershell scripts that can pull trending numbers.. Look at dfm graph -F csv
... View more
Joel - Don't take this the wrong way, but I would suggest grabbing a powershell book from amazon and flipping through it Also, for general powershell questions, I would use a forum site @ powershell.com or powershell.org. Even though i'm just a customer, this community is for Powershell for Netapp mainly But to answer your questions += usually when you stuff an array of custom objects, and $filers = "1","2" - creates an array so you can do something like $filerrs | % { }
... View more
Actually, this is a little better, get-navol | ? {$_.used -gt 80} | Select Name,Aggregate,@{Name="Used";E={Convertto-formattednumber $_.used percent}},@{Name="Available (GB)";E={convertto-formattednumber $_.available Datasize "0.00"}} | ft -autosize You should always pipe in your where clause before you do any sorting.. Selecting...
... View more
Joel - A few things I would do differently. This is a little easier in my opinion get-navol | Select Name,Aggregate,Used,@{Name="Available (GB)";E={convertto-formattednumber $_.available Datasize "0.00"}} | ? {$_.used -gt 80} | ft -autosize But, I would do one more thing. Have a search for a post I did about filer_report. It will report on the filers with excel conditional formatting. Give that a shot
... View more
Clinton - First, let me say that I love Powershell for Netapp. I've written some cool stuff with it with all your help. Now for the wish list. Native powershell cmdlets for vscan stats and cifs stat. I'm particularly interested because of pBlk exhaustion. Also, for vscan, we have a vfiler report that runs which gives us a dashboard view of vfilers/aliases, but a column for vscan status would be cool. I don't feel like using invoke-nassh and massaging that data. All in all, it's pretty suite.
... View more
i would probably go at it differently. When you read stuff into a file it becomes in array that you would iterate through. This doesn't seem the right case for it It's easy to do something like $partners = "autosupport@cstore.com,dl-desses@cstor.com" set-naoption autosupport.partner.to $partners
... View more
Ah.. that's easy man... We have 200+ filers, so automation is a key for us. But you have to start small... Look at the report i wrote on volumes and aggrs man. Start with creating a script service account that is consistent across all your filers. Also, dare i ask, why you have so many logins?
... View more
No, you can't do that Let's backstep. How many controllers are you talking about and how many different logins? Also, like I said in my previous post, unless there is specific business reasons what your doing is not scalable. What I would recommend is use a standard service account throughout your filers.
... View more