Hey everyone.
I want to be able to turn off the array based snapshot schedule on a particular volume once it has been provisioned through Provisioning Manager. Turns out you can use a post provisioning script to do so as long as you can get at the PM_VOLUME_NAME environment variable. Through my travels in the community I have learned there is a PERL way of expanding all of the variables in %ENV. See below:
foreach $key (sort(keys %ENV))
{
if ($key =~ /^PM_/) {
print "$key: $ENV{$key}\n";
}
}
I have also learned the the PM_VOLUME_NAME is returned as filer:/vol/volume.
Here is my script:
@echo off
set vol_name=PM_VOLUME_NAME
for /f "delims=: tokens=1,2" %%a in ("%vol_name%") do dfm run cmd %%a vol options %%b nosnap on
I am missing the Windows batch equivalent of being able to get and expand PM_VOLUME_NAME into vol_name so I can manipulate it in the next line of the script. Anybody have this lying around?
Thanks in advance.