Previous | Home | Next

Managing profiles with the command line

You already saw how profiles are created with the Profile Management Tool and dmgr consoles. At the heart of these tool lays, which can also be used to manage profiles directly. Using, we can create, list, augment, or delete the profiles.

The manageprofiles command is in...

To get more information about using this command, type:

Listing profiles

To list all created profiles...

Create profiles from templates

When creating a profile using, specify a profile template, which is supplied with the product. WAS uses these templates as a base for creating a new profile. These templates are located in...

Each template consists of a set of files that provide the initial settings for the profile and a list of actions to perform after the profile is created.

The following profiles are defined by default for the WAS V8.5:

To create a deployment manager named Dmgr02 with enabled administrative security enabled.

manageprofiles.bat -create 
                   -templatePath /IBM/WAS/AppServer/ 
                   -serverType DEPLOYMENT_MANAGER 
                   -profileName Dmgr02 
                   -profilePath /IBM/WAS/AppServer/profiles/Dmgr02 
                   -enableAdminSecurity true 
                   -adminUserName wasadmin 
                   -adminPassword passw0rd 
                   -cellName myHostCell01 
                   -nodeName myHostCellManager01

The log files created when you run are located in:

For example:

Additional log files are created in...

For example:

Do not manually modify the files in...

Create profiles with non-default ports

During profile creation using, we can accept the default port values, or we can specify our own port settings. To specify ports...

During profile creation, uses an automatically generated set of recommended ports. We can modify the port values using the following parameters on

defaultPorts Assigns default or base port value for the profile.
startingPort Starting port number for generating and assigning all ports for the profile. If a port value in the sequence conflicts with an existing port assignment, the next available port value is used.
portsFile Specifies a path to a file that defines port settings for the profile.

Example contents of portdef.props file

We can also use the validatePorts parameter, which specifies that ports must be validated to ensure they are not reserved or in use. This parameter helps identify ports that are not being used.

Create a stand-alone profile using the startingPort parameter

manageprofiles.bat -create 
                   -templatePath /IBM/WAS/AppServer/profileTemplates/default 
                   -profileName AppSrv05 
                   -profilePath /IBM/WAS/AppServer/profiles/AppSrv05 
                   -startingPort 22222 
                   -cellName test5Cell01 
                   -nodeName test5Node01

To change the ports after the profile creation, use the updatePorts tool.

Deleting profiles

To properly delete a profile:

In case of problems or errors while deleting the profiles, check the logs under:

Deleting a profile using manageprofiles...

$ manageprofiles.bat -delete -profileName AppSrv05
INSTCONFSUCCESS: Success: The profile no longer exists.
$ manageprofiles -validateAndUpdateRegistry

Use the manageprofiles interactive utility

The manageprofile command takes many parameters and for complex WebSphere environments it can be difficult to use. There is an interactive tool called Manage Profiles Interactive that guides you through the important manageprofile use cases.

This command is not shipped with the WebSphere package, but it is available to download at no cost.

After we download the tool, unpack its content in...

After you unpack it, we can use two scripts to run it:

Listing profiles using the interactive manageprofiles tool

$ run_manageprofilesInteractive.bat
$ CALL "/IBM/WAS/AppServer/bin/setupCmdLine.bat"
manageprofilesInteractive-v70 V0.6.6 ~ 2011.05.10/Windows Server 2008 R2


1 create
2 augment
3 delete 4 unaugment
5 unaugmentAll
6 deleteAll
7 listProfiles
8 listAugments
9 backupProfile
10 restoreProfile
11 getName
12 getPath
13 validateRegistry
14 validateAndUpdateRegistry
15 getDefaultName
16 setDefaultName
17 response 18 help Select number [press "q" to quit]: 7

LISTPROFILES command summary:

Press "b" to go back and make changes or "c" to continue: c

Press "q" to quit, "r" add to response file, or "c" to run the command: c

manageprofiles.bat -listProfiles
Added command to /IBM/WAS/AppServer/logs/manageprofilesInteractive.log

You may check /IBM/WAS/AppServer/logs/manageprofiles/listProfiles.log for command status. [Dmgr01, AppSrv01, Custom01, AdminAgent01, JobMgr01, AppSrv02, Dmgr02] Elapse time: 4.954 seconds Done!

After the tool is launched, it prints the available operations. To select the operation, provide the operation number and follow any instructions to execute the command. Notice that this tool can also generate response files for the manageprofile command. The tool also records all invoked commands in a special manageprofilesInteractive.log file.

[6/25/12 6:55 PM] manageprofiles.bat -listProfiles