i created the following NSH script for automatically licensing servers but i am getting weird results. when i execute this against a server that is not licensed i get exit code 1: cd: software not licensed: //servername/
when i execute this against a server that is already licensed i get exit code 0 (i am using the autolic with -l to allow it deal with servers that are already licensed)
i have the following 3 parameters
USER (set to my ID)
PASS (set to my password)
The NSH script is:
for server in $*
autolic -l -v $USER $PASS $SERVER
does anyone have any ideas or an example of a autolicensing script that works ok?
You need to do this as a type 2 nsh script and feed this list of servers in as argument. When you use the type 1 nsh script type, the first thing that happens is to cd to the target. since it’s not licensed, that fails.