#Query the dashboard on netapp filer and return result
write-host "* Alarm Dashboard *"
(Get-NcDashboardAlarm | format-table -AutoSize)
#run the gather variables and output to output.txt
$today = Get-Date
$dir = "$data_dir_date\output.txt"
Add-content $dir "Netapp health Checks for $filer1, $today"
*****here i want to write the output of $gather_dashboard into the text file $dir, then create a new line in text file and do the same thing with a different variable*****
SO what i am trying to achieve is a log of the ouput of each variable of which there are 6 or 7. There would have to be 3 lines between each output, and each output has a relevant title inserted.
Currently anything i do overwrites the text file with each variable or just produces nothing.