So I have been play with the NetApp DataOnTap add in for a while now want to share this. Essentially all it does is run Invoke-NaSysstat at timed intervals and saves it to an hourly csv file
[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') $filer = [Microsoft.VisualBasic.Interaction]::InputBox("Enter the comma seperated filer name", "Enter Filer Name", "") #Change to match you path Import-Module E:\PsMON\netapp\DataONTAP.psd1 Connect-NaController $Filer -Credential root $matrix = @() $doit = $True $timer = 10 $LastHour = (Get-Date -format "HH") while($doit){ $ThisHour = (Get-Date -format "HH") $tSysStat = Invoke-NaSysstat -Count 1 | Select $tSysStat $matrix += $tSysStat If($ThisHour -ne $LastHour){ $outFile = $filer + "_" + (Get-Date -format "yyyy-MM-dd_HHmm") + ".csv"; $Matrix | Export-Csv $outFile -NoTypeInformation;$matrix = @(); "-$outFile-" } $LastHour = $ThisHour For($i=0;$i-le $timer;$i++){Sleep 1 } } $outFile = $filer + "_" + (Get-Date -format "yyyy-MM-dd_HHmm") + ".csv";$Matrix | Export-Csv $outFile -NoTypeInformation |