I just love Jacl (Tcl)... not...
First, it is highly unlikely that your node name is AppServ01
To list the configuration IDs for the known/configured servers, you can:
wsadmin>$AdminConfig list "Server"
The output will be 1 line for each server, and will be of the form:
server1(cells//nodes/e>/servers/server1|server.xml#Server_ue#>)
So, when you execute:
wsadmin>set ns $AdminConfig getid /Node:/
The value of should be what is shown/found in the configuration ID from the previous output.
Does this make sense?
So, when I tried doing that command, I got an exception because the in order to perform the assignment, we really had to tell the scripting engine to "execute" or call the getid method of the $AdminConfig scripting object.
To do this, I had to type:
wsadmin>set ns [$AdminConfig getid /Node:/]
where was the actual nodeName value. Does that make sense?
The output of the preceding command was the value that was assigned to the $ns variable (i.e., the configuration ID of the node in question).
And in order to get the actual hostname into the host variable, I had to:
wsadmin>set host [$AdminConfig showAttribute $ns hostName]
Does that make sense?
So, the question still remains, how to have the value of the host variable in the command.
I was able to:
set options "-keyStoreName NodeDefaultKeyStore -certificateAlias certReq4 eSize 1024 -certificateCommonName $host -certificateRequestFilePath D:/tempcerts/testCertReq.arm -certificateOrganization IBM"
Then, you should be able to do something like:
$AdminTask createCertificateRequest [ $options ]