PowerShell Script to Get NetApp SnapMirror Info

Note, you’ll need to install the dataontap PowerShell cmdlets first!
#  you’ll get an output in C:\ with all the NetApp controller IPs listed in C:\controllers.txt

# this needs to be a one ip or hostname per line text file
$CONTROLLERS = get-content C:\controllers.txt


# make sure to change the password here
$password = ConvertTo-SecureString “passssss” -AsPlainText –Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList “root”,$password
import-module dataontap
Connect-NaController $CONTROLLER -Credential $cred
Get-NaSystemLog -SnapMirror | Export-Csv C:\$CONTROLLERS.csv