Microsoft Virtualization Discussions
Hi, I'm looking for some help again 🙂 Ideally i'd like to replace all rsh based batch files for the post backup snapvaultscripts with a powershell script based on the toolkit commands.
Snapmanger calls a bat file which in turn runs a ps1 file containing the Start-NasnapVaultSecTransfer (s) and the Start-NaSnapvaultSecSnapshot.
My issue due to my limited scripting ability is transfering the post command arguments from SnapManager -PostCmdArgs '$SqlSnapshot $SqlSnapshot $InfoSnapshot' into the -PrimarySnapshot
I can get the script to work no issue when using and explicitly stating an (_recent) snapshot in the powershell script. But we would like stick with timestamped snapmanager source snapshots.
Has anyone achieved this or any scripting tips?
Thanks in advance,
You can access parameters in Powershell like this:
To update the Vault relationship with the latest snapshot the script could look like this:
Start-NaSnapvaultSecTransfer /vol/vol_primary/qtree_primary -PrimarySnapshot $SqlSnapshot
Try this script: https://communities.netapp.com/docs/DOC-15159
Let's walk you through the new & improved Knowledge Base and further enrich your experience with NetApp Products.
Join our Discord Community