AdminControl
xxxxxxxxxx
wsadmin>print AdminControl.help()
WASX7027I: The AdminControl object enables the manipulation of MBeans running in a WebSphere server process.
The number and type of MBeans available to the scripting client depends on the server to which the client is connected.
If the client is connected to a Deployment Manager,
then all the MBeans running in the Deployment Manager are visible as are all the MBeans running in the Node Agents connected to this Deployment Manager,
and all the MBeans running in the application servers on those nodes.
AdminConfig
xxxxxxxxxx
wsadmin>print AdminConfig.help()
WASX7053I: The AdminConfig object communicates with the Config Service in a WebSphere server to manipulate configuration data for a WebSphere installation.
AdminConfig has commands to list, create, remove, display, and modify configuration data, as well as commands to display information about configuration data types.
AdminApp
xxxxxxxxxx
wsadmin>print AdminApp.help()
WASX7095I: The AdminApp object allows application objects to be manipulated -- this includes installing, uninstalling, editing, and listing.
Most of the commands supported by AdminApp operate in two modes:
the default mode is one in which AdminApp communicates with the WebSphere server to accomplish its tasks.
A local mode is also possible, in which no server communication takes place.
The local mode operation is invoked by bringing up the scripting client with no server connected using the command line "-conntype NONE" option
or setting the "com.ibm.ws.scripting.connectionType=NONE" property in the wsadmin.properties.
AdminTask
xxxxxxxxxx
wsadmin>print AdminTask.help()
WASX8001I: The AdminTask object enables the execution of available admin commands.
AdminTask commands operate in two modes:
the default mode is one which AdminTask communicates with the WebSphere server to accomplish its task.
A local mode is also available, in which no server communication takes place.
The local mode of operation is invoked by bringing up the scripting client using the command line "-conntype NONE" option
or setting the "com.ibm.ws.scripting.connectiontype=NONE" property in wsadmin.properties file.
Help
xxxxxxxxxx
wsadmin>print Help.help()
WASX7028I: The Help object has two purposes:
First, provide general help information for the the objects supplied by wsadmin for scripting: Help, AdminApp, AdminConfig, AdminControl and AdminTask.
Second, provide a means to obtain interface information about MBeans running in the system.
For this purpose, a variety of commands are available to get information about the operations, attributes, and other interface information about particular MBeans.
${WAS_PROFILE_ROOT}\bin
wsadmin.bat -lang jython -username admin -password admin
exit
when you are done.xxxxxxxxxx
c:\>cd C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin
C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin>wsadmin.bat -lang jython -username admin -password admin
WASX7209I: Connected to process "server1" on node node1 using SOAP connector; The type of process is: UnManagedProcess
WASX7031I: For help, enter: "print Help.help()"
wsadmin>print "Hello Interactive World!"
Hello Interactive World!
wsadmin>exit
${WAS_PROFILE_ROOT}\bin
wsadmin.bat -lang jython -username admin -password admin -c "print 'Hello Individual World!'"
wsadmin.sh -lang jython -username admin -password admin -c 'print "Hello Individual World!"'
-c
parameter followed by the Jython command.xxxxxxxxxx
c:\>cd C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin
C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin>wsadmin.bat -lang jython -username admin -password admin -c "print 'Hello Individual World!'"
WASX7209I: Connected to process "server1" on node node1 using SOAP connector; The type of process is: UnManagedProcess
Hello Individual World!
firstJythonSample.jy
):xxxxxxxxxx
jythonVar="Hello script files world!"
print jythonVar
C:\programs\jythonSamples\firstJythonSample.jy
wsadmin.bat -lang jython -username admin -password admin -f C:\programs\jythonSamples\firstJythonSample.jy
-f
parameter followed by the path of the file path.xxxxxxxxxx
c:\>cd C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin
C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin>wsadmin.bat -lang jython -username admin -password admin -f C:\programs\jythonSamples\firstJythonSample.jy
WASX7209I: Connected to process "server1" on node node1 using SOAP connector; The type of process is: UnManagedProcess
Hello script files world!
firstJythonProfileSample.jy
):xxxxxxxxxx
jythonProfileVar="Hello profile scripts world!"
print jythonProfileVar
C:\programs\jythonSamples\firstJythonProfileSample.jy
wsadmin.bat -lang jython -username admin -password admin -profile C:\programs\jythonSamples\firstJythonProfileSample.jy -f C:\programs\jythonSamples\firstJythonSample.jy
-profile
parameter followed by the path of the file path.xxxxxxxxxx
c:\>cd C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin
#profile script + interactive commands
C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin>wsadmin.bat -lang jython -username admin -password admin -profile C:\programs\jythonSamples\firstJythonProfileSample.jy
WASX7209I: Connected to process "server1" on node node1 using SOAP connector; The type of process is: UnManagedProcess
Hello profile scripts world!
WASX7031I: For help, enter: "print Help.help()"
wsadmin>print jythonProfileVar
Hello profile scripts world!
wsadmin>exit
#profile script + individual commands
C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin>wsadmin.bat -lang jython -username admin -password admin -profile C:\programs\jythonSamples\firstJythonProfileSample.jy -c "print 'Hello Individual World!'"
WASX7209I: Connected to process "server1" on node node1 using SOAP connector; The type of process is: UnManagedProcess
Hello profile scripts world!
Hello Individual World!
#profile script + script file
C:\programs\IBM\WebSphere\AppServer\profiles\profile1\bin>wsadmin.bat -lang jython -username admin -password admin -profile C:\programs\jythonSamples\firstJythonProfileSample.jy -f C:\programs\jythonSamples\firstJythonSample.jy
WASX7209I: Connected to process "server1" on node node1 using SOAP connector; The type of process is: UnManagedProcess
Hello profile scripts world!
Hello Script files World!
${WAS_ROOT}\properties\wsadmin.properties
xxxxxxxxxx
#-------------------------------------------------------------------------
# The defaultLang property determines what scripting language to use.
# Supported values are jacl and jython.
# The default value is jacl.
#-------------------------------------------------------------------------
com.ibm.ws.scripting.defaultLang=jacl
#-------------------------------------------------------------------------
# The traceFile property determines where trace and logging output are directed.
# If more than one user will be using wsadmin simultaneously, different traceFile properties should be set in user properties files.
# The default is that all tracing and logging go to the console;
# it is recommended that a value be specified here.
# If the file name contains DBCS characters, use unicode format such as \uxxxx, where xxxx is a number
#-------------------------------------------------------------------------
com.ibm.ws.scripting.traceFile=$(was.install.root)/logs/wsadmin.traceout