Re: [Networker] Remote admin of Windows drives
2006-07-06 09:54:54
hi,
This is an extract of a unix script I use to control a Windows server
device:
Value= Yes
printf "print type:NSR device;name:\\\\.\\Tape0\nupdate
enabled:$VALUE\n"|nsradmin -s foo -i -
echo 'option Dynamic' >/tmp/ar1;
echo 'print type:NSR device; name:"rd=mike:\\\\\\\.\\\Tape1"'>>/tmp/ar1;
echo "update enabled:$VALUE">>/tmp/ar1;
nsradmin -s foo -i /tmp/ar1;
rm /tmp/ar1;
echo 'option Dynamic' >/tmp/ar1;
echo 'print type:NSR device; name:"rd=mike:\\\\\\\.\\\Tape2"'>>/tmp/ar1;
echo "update enabled:$VALUE">>/tmp/ar1;
nsradmin -s foo -i /tmp/ar1;
rm /tmp/ar1;
This script will enable/disable some tapes drives on a remote Windows
server. Has you can see, I didn't find a way to put the device name in a
variable.
Hope this help!
Alain
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu
if you have any problems
wit this list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|
|
|