t_ski
Supreme [H]ardness
- Joined
- Jun 13, 2006
- Messages
- 7,506
I've been handed responsibility for a backup system that utilizes EMC Networker. I just found out that I have a HUGE amount of old save sets that need to be deleted manually (somewhere in the 10-20,000 range), so I'm hoping to do this with a script.
I can output the save set IDs to a CSV file like this:
mminfo -ot -xc, -q "savetime<3 months ago" -r ssid,client,name,totalsize,savetime >C:\Over90days.csv
The "-r" switch allows me to determine what info I want in each column, and I can change the "savetime" value as needed. Column 1 of the CSV file will have the SSID, which is a - to 11 digit number like "975486124."
I tried the following as a PS script:
Powershell does not like the ssid value, and I get the following for each SSID number in the CSV file:
I know if I manually run the command as
...it works fine.
Thanks in advance for any assistance you can provide.
I can output the save set IDs to a CSV file like this:
mminfo -ot -xc, -q "savetime<3 months ago" -r ssid,client,name,totalsize,savetime >C:\Over90days.csv
The "-r" switch allows me to determine what info I want in each column, and I can change the "savetime" value as needed. Column 1 of the CSV file will have the SSID, which is a - to 11 digit number like "975486124."
I tried the following as a PS script:
Code:
$1 = Import-CSV C:\Over90days.csv
Foreach ($ssid in $1)
{
nsrmm -y -d -S $ssid
}
Powershell does not like the ssid value, and I get the following for each SSID number in the CSV file:
91383:nsrmm: '@ssid=975486124}' is not a valid save set ID.
usage: nsrmm [-v | -q] [-s server] [-f device]
or nsrmm -l [-v | -q] [-s server] [-f device] [-myB]
[-e forever] [-c capacity] [-o mode] [-b pool] [-R | volume]
or nsrmm {-u | -j} [-v | -q] [-s server] [-y] [-f device | volume...]
or nsrmm -p [-v | -q] [-s server] [-f device]
or nsrmm -m [-v | -q] [-s server] [-f device] [-r] [volume]
or nsrmm -H -f device [-v | -q] [-s server] [-y]
or nsrmm -E -f device [-v | -q] [-s server] [-y]
or nsrmm {-d | -o mode} [-v | -q] [-s server] [-Py]
[-S ssid[/cloneid] | -V volid | volume...]
or nsrmm [-s server] -S ssid {-w browsetime | -e retentiontime} [-y]
or nsrmm -x [-s server] [-v] {-V source_volid destination_volid | source_volume destination_volume}
I know if I manually run the command as
Code:
nsrmm -y -d -S <insert_ssid#here>
Thanks in advance for any assistance you can provide.