Using WebLogic Server Commands
Using WebLogic Server Commands
This section presents the syntax and required arguments for using WebLogic Server
commands. WebLogic Server commands are not case-sensitive.
Syntax
Note: When you invoke most weblogic.Admin commands, you specify the arguments in
Table 21-1 to connect to a WebLogic Server instance and to specify the user
credentials of a WebLogic Server user who has permission to invoke the command.
Argument
Definition
-url URL
The listen address of the WebLogic Server that is the target of the command.
Use this URL if you cannot access the Administration Server and you want to target
a Managed Server.
-username username
-password password
If you specify -username username but do not specify the -password argument,
weblogic.Admin prompts you for a password.
-userconfigfile config-file
-userkeyfile admin-key
Specifies the name and location of the key file that is associated with the user-
configuration file you specify.
When you create a user-configuration file, the STOREUSERCONFIG command uses a key
file to encrypt the username and password. Only the key file that encrypts a user-
configuration file can decrypt the username and password.
Note: The exit code for all commands is 1 if the Administration client cannot
connect to the server.
Table 21-1 describes the alternatives that the weblogic.Admin utility provides for
passing usernames and passwords to a server instance.
In a development environment in which security is not a top priority, you can use
the -username and -password arguments when invoking the weblogic.Admin utility
directly on the command line or in scripts. With these arguments, the username and
password are not encrypted. If you store the values in a script, the user
credentials can be used by anyone who has read access to the script.
The following list summarizes the order of precedence for the weblogic.Admin user-
credentials arguments:
If you specify -username username -password password, the utility passes the
unencrypted values to the server instance you specify in the -url argument.
The following command specifies the username weblogic and password weblogic
directly on the command line:
java weblogic.Admin -username weblogic -password weblogic COMMAND
The following command uses a user-configuration file and key file that are located
at the default pathname:
java weblogic.Admin COMMAND