Moreover i am facing one more issue, while triggering this script through scheduler it is not pushing the details to the output file but when I run the same script through Powershell ISE the output file generates the snapmirror status details
using get-nasnapmirror cmdlet we can get the snapmirror detaila and we can filter with lag time more than 24 hours. But it have some issues.
Issue: Get-snapmirror cmdlet doesn't pull the snapmirror relationships which are created from vfiler context. It only pulls the report from vfiler0. Hence any snapmirror which are created from vfiler context are missed. We have tested this functionality.
I am redirecting the output to an outpu file with the below mentioned commands. If I execute the powershell script using Powershell ISE it works and pull the snapmirror data and redirect to the output file as desired but when it runs through windows scheduler it doesn't redirect the output