--snip--
rsh to your filer with the output
rsh <filername> cifs shares -add <name of share> /vol/volume_for_your_share/
--snip--
I would be very, very careful with using rsh. It's very insecure. ssh via either the standard unix ssh command, or plink, can be used as a drop in replacement, and is much, much more secure.
ssh authorized_keys (passwordless ssh): http://ww w.nabble.com/ssh-config-on-DOT-7-t2595957.html
ssh inline replacement of rsh on a unix host: http://www.didc. lbl.gov/DPSS/ssh-info.html
If you *do* have to use rsh, be sure to use role based access controls to create a user, and a role w/ minimum number of commands needed.