The following is my ncmd.bat script. This file is called from other batch files or on it's own to send commands to the NetApp filer:
@echo off
REM ---------------------------------------------------------------
REM Usage
REM ncmd [filer] "[command]"
REM
REM Remember to enclose the command in "'s
REM
REM This batch file assumes that the private key pairing has been
REM configured on the [filer]
REM
REM This batch file will send the [command] to the [filer] using a
REM private key for authentication. This allows a script to access
REM the filer in order to automate tasks
REM
REM This batch file is called from other batch files. Do not edit
REM unless you know the implications of that
REM----------------------------------------------------------------
plink -l root %1 -i "x:\path\to\yourkey.ppk" %2
As you can see the usage is ncmd.bat [filer] [command]
You will need to change the path to the private key you created from my previous post. Also, if you're sending multiple caommands to the filer you need to enclose them in "'s (ie: ncmd filername "vol status").
Thursday, March 19, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment