2012-05-03 07:15 AM
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,
2012-05-14 08:11 AM
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