Unsolved
This post is more than 5 years old
3 Posts
0
1381
June 9th, 2006 15:00
Using NSRAdmin to disable autorestart
I want to use NSRAdmin and NSR_Group to set the autorestart to disabled.
I'm in Windows and would prefer to script this - i.e. run against a list lf 40 groups, setting all of them to disabled.
I see that nsradmin runs interactively, but there is also the ability to create a file to run it against. How does one do that?
Also, I will need to have a script to create a list of our groups and pipe it to a text file. I'm still researching that.
Thank you.
I'm in Windows and would prefer to script this - i.e. run against a list lf 40 groups, setting all of them to disabled.
I see that nsradmin runs interactively, but there is also the ability to create a file to run it against. How does one do that?
Also, I will need to have a script to create a list of our groups and pipe it to a text file. I'm still researching that.
Thank you.
No Events found!


ble1
6 Operator
•
14.4K Posts
•
56.2K Points
0
June 11th, 2006 04:00
cluu1
23 Posts
0
June 12th, 2006 13:00
@Echo Off
Echo show name;autostart >t1.tnf
Echo print type:NSR group >>t1.tnf
Echo update autostart: Disabled;
nsradmin -i t1.tnf |find "name" >>grpname.tnf
Echo Current Groups in NetWorker >grpnames.txt
Echo ------------------------------------------ >>grpnames.txt
For /F "tokens=2 delims=; " %%a in (grpname2.tnf) do Echo %%a >>grpnames.txt
Del t1.tnf
Del grpname.tnf
Cls
Echo Please view the text file "grpnames.txt" for the list of group names.
dieselboi1
3 Posts
0
June 12th, 2006 15:00
At the beginning, it states "show name;autostart" should the ; be a : ?
Further, should the 3rd line - Echo update autostart: disabled also be >t1.tnf?
This looks like a unix script. If so, could someone assist me in making it for windows?
thanks.
ble1
6 Operator
•
14.4K Posts
•
56.2K Points
0
June 13th, 2006 00:00
cluu1
23 Posts
0
June 13th, 2006 13:00
This script is for Windows. To answer your questions:
At the beginning, it states "show name;autostart" should the ; be a : ?
No the semi colon ; is a separation of fields to show. The colon : is used to identify a value for the field.
Further, should the 3rd line - Echo update autostart: disabled also be >t1.tnf?
Yes, sorta. It should be >>t1.tnf as you want to append to what's already there. The single > is use to output to a file overwriting what's currently in it. The double >> is used to append to the file. The "Echo update autostart: Disabled;" line needs to have a capital D in it and not a lower case.