WAS v8.5 > Script the application serving environment (wsadmin)Use the wsadmin scripting AdminTask object for scripted administration
Use AdminTask to access a set of administrative commands that provide an alternative way to access the configuration commands and the running object management commands.
The administrative commands run simple and complex commands. They provide more user friendly and task-oriented commands. The administrative commands are discovered dynamically when we start a scripting client. The set of available administrative commands depends on the edition of WebSphere Application Server that you installed. We can use AdminTask commands to access these commands. Administrative commands are grouped based on their function. We can use administrative command groups to find related commands. For example, the administrative commands related to server management are grouped into a server management command group. The administrative commands related to the security management are grouped into a security management command group. An administrative command can be associated with multiple command groups because it can be useful for multiple areas of system management. Both administrative commands and administrative command groups are uniquely identified by their name.
Two run modes are always available for each administrative command, namely the batch and interactive modes. When we use an administrative command in interactive mode, you go through a series of steps to collect your input interactively. This process provides users a text-based wizard and a similar user experience to the wizard in the dmgr console. We can also use the help command to obtain help for any administrative command and AdminTask.
The administrative commands do not replace any existing configuration commands or running object management commands but provide a way to access these commands and organize the inputs. The administrative commands can be available in connected or local mode. The set of available administrative commands is determined when we start a scripting client in connected or local mode. If a server is running, it is not recommended that you run the scripting client in local mode because any configuration changes made in local mode are not reflected in the running server configuration and vice versa. If you save a conflicting configuration, you could corrupt the configuration.
Use parameter name and parameter value pairs to specify the parameters of a step in any order. We do not have to specify option parameters. This applies to all commands for AdminTask. For example:
AdminTask.createCluster('[-clusterConfig [-clusterName cluster1 -preferLocal true]]')
To determine the names of the step parameters, use the following command: AdminTask.help('command_name', 'step_name'), as the following example demonstrates:
AdminTask.help('createCluster', 'clusterConfig')
- Read Invoking an administrative command in batch mode using wsadmin.sh to use administrative commands in batch mode.
- Read Invoking an administrative command in interactive mode using wsadmin.sh to use administrative commands in interactive mode.
- Read Obtain online help using wsadmin.sh to learn how to use scripting for online help.
Subtopics
- Obtain online help using wsadmin.sh
We can select from three levels of online help for administrative commands.- Invoking an administrative command in batch mode using wsadmin.sh
Use AdminTask commands to invoke an administrative command in batch mode.- Invoking an administrative command in interactive mode using wsadmin.sh
These steps demonstrate how to invoke an administrative command in interactive mode.- Data types for AdminTask using wsadmin.sh
The parameters for AdminTask accept various data types for different commands. This topic provides examples of valid data type syntax.- Obtain online help using wsadmin.sh
We can select from three levels of online help for administrative commands.- Invoking an administrative command in batch mode using wsadmin.sh
Use AdminTask commands to invoke an administrative command in batch mode.- Invoking an administrative command in interactive mode using wsadmin.sh
These steps demonstrate how to invoke an administrative command in interactive mode.- Data types for AdminTask using wsadmin.sh
The parameters for AdminTask accept various data types for different commands. This topic provides examples of valid data type syntax.
Reference:
Administrative command invocation syntax using wsadmin.sh
Commands for AdminTask using wsadmin.sh