Hello,
I am trying to set up a pre_backup SMVI script that connects to the SnapDrive service on the target machine(s) but I'm getting hung up parsing the VIRTUAL_MACHINE.# variable in DOS. Does anyone have this figured out and want to share?
I don't suppose there's a Powershell library for SDCLI?
Thanks
set LoopCount=1
set retention=5
set path=%path%;"C:\Program Files\NetApp\SnapDrive"
REM Inherits BACKUP_PHASE=PRE_BACKUP, VIRTUAL_MACHINES=2, VIRTUAL_MACHINE.1,2,...
if %BACKUP_PHASE% NEQ PRE_BACKUP goto out
if %VIRTUAL_MACHINES% LSS 1 goto out
:StartMachine
set handle=
set PowerStatus=
set mounts=
set c=1
set ThisHost=VIRTUAL_MACHINE.%LoopCount%
FOR /f "tokens=1,2,3 delims=|" %%G IN (%ThisHost%) DO @set PowerStatus=%%I
If %PowerStatus% NEQ POWERED_ON goto out
FOR /F "tokens=1 delims=|" %%G IN (%ThisHost%) DO set ComputerNM=%%G