Hi Clinton here is the ps file, i modified a script file i found here on the forum(http://communities.netapp.com/docs/DOC-6349) and change the the script to output the results to a text file and to pass in credentials so i could use this on multiple filers
------------------------------------
Param ([string]$filer, [string]$admin, [string]$pass)
# NetApp Data ONTAP PowerShell Toolkit
$exist = $false
foreach ($modulePath in ${env:PSModulePath}.Split(";"))
{
if ((Test-Path ($modulePath + "DataONTAP\DataONTAP.dll")) -and !$exist)
{
Write-Host "Adding NetApp DataOnTap PowerShell" -ForegroundColor Green
$exist = $true
Import-Module DataONTAP
}
}
#$filer = "***.***.***.***"
$spass = ConvertTo-SecureString $pass -AsPlainText -Force
#$admin = "****"
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $admin,$spass
Connect-naController $filer -credential $cred
$aggrlist = Get-NAAggr
$file = "C:\fujitsuit\test.txt"
#Remove-Item $file
New-Item $file -type file -force
Foreach ($aggr in $aggrlist){
[double]$AggrOverSub=1
$aggrInfo = "Aggr Start: " + $aggr.Name + " : Aggr Size = " + ([Math]::Round(($aggr.SizeTotal/(1024*1024*1024)),1)) + "GB" + " : Used Size = " + ([Math]::Round($aggr.SizeUsed/(1024*1024*1024),1)) + "GB" + " : % used = " + $aggr.SizePercentageUsed + "%"
Add-Content $file $aggrInfo
#Add-Content $file "`r"
$LunList = Get-NaLun
$Vollist = Get-NaVol
ForEach ($volume in $Vollist)
{ [double]$VolOverSub=1
$vol = (get-navol $volume.name)
[single]$perc=100 * ([single]($vol.SizeUsed) /[single]($vol.SizeTotal))
$perc=[math]::Round($perc,2)
if ($aggr.name -eq $vol.containingaggregate )
{ $volInfo = " Vol : " + $vol.Name + ": Vol Size = " + ([math]::round(($volume.SizeTotal/(1024*1024*1024)),1))+ "GB" + ": Used Size = " + $perc + "%"
Add-Content $file $volInfo
foreach ($LUN in $LunList)
{ $Sour=$LUN.Path
$spath = $Sour.Split("/")
if (($spath[2].equals($vol.name)) -or ($spath[3].equals($vol.name)))
{ [single]$perc=100 * ([single]((get-nalunoccupiedsize $LUN.path)) /[single]($LUN.Size))
$perc=[math]::Round($perc,2)
$luninfo = " LUN: = " + $LUN.path + " : Size = " +([Math]::Round(($LUN.size/(1024*1024*1024)),1))+ "GB" + " : Used = " +([Math]::Round( ((get-nalunoccupiedsize $LUN.path)/(1024*1024*1024)),1))+"GB" + " = " + $perc + "%"
Add-Content $file $luninfo
$VolOverSub=$VolOverSub+[double]$LUN.Size
}
}
}
}
$aggrinfo2 = "Aggr End : " + $aggr.Name
Add-Content $file $aggrinfo2
}
--------------------------------