I needed to do this today in WebSphere 8.5 Network Deployment, so I tracked it and wrote a script. This is how I do it.
Create a WebSphere profile using the GUI-based profile management tool.
Each file you create records a log file:
C:\Program Files (x86)\IBM\WebSphere\AppServer\logs\manageprofiles\XXXX_create.log
In the log, find the -create switch. Clean and copy this line into the script by changing or parameterizing the fields as you wish:
SET PROFILENAME=Profile2 SET HOSTNAME=MyHostName SET WAS_BIN=C:\Program Files (x86)\IBM\WebSphere\AppServer\bin SET PROFILE_PATH=C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\%PROFILENAME% SET WAS_TEMPLATE=C:\Program Files (x86)\IBM\WebSphere\AppServer\profileTemplates\default SET WAS_CELL=%HOSTNAME%%PROFILENAME%Cell SET WAS_PORTS_FILE=C:\Program Files (x86)\IBM\WebSphere\AppServer\logs\manageprofiles\was_default_portdef.props SET A1=-create -serverName %PROFILENAME% -profileName %PROFILENAME% -cellName %WAS_CELL% -nodeName %PROFILENAME% -hostName %HOSTNAME% SET A2=-profilePath "%PROFILE_PATH%" -templatePath "%WAS_TEMPLATE%" SET A3=-applyPerfTuningSetting development -enableAdminSecurity false -winserviceCheck false -omitAction defaultAppDeployAndConfig SET A4=-portsFile "%WAS_PORTS_FILE%" SET A5=-signingCertDN "cn=10.0.2.15\\,ou=Root Certificate\\,ou=%WAS_CELL%\\,ou=%PROFILENAME%\\,o=IBM\\,c=US" -personalCertDN "cn=10.0.2.15\\,ou=%WAS_CELL%\\,ou=%PROFILENAME%\\,o=IBM\\,c=US" SET A6=-personalCertValidityPeriod 10 -signingCertValidityPeriod 15 SET WAS_ARGS=%A1% %A2% %A3% %A4% %A5% %A6% call "%WAS_BIN%\manageprofiles.bat" %WAS_ARGS%
You will need to search for the files "C: \ Program Files (x86) \ IBM \ WebSphere \ AppServer \ logs \ manageprofiles * _portdef.props" and copy one of them for your use, just like me.
The result of my script was thus a cloned / modified version of the profile that I created earlier.
Then I ran it on the command line:
"C:\Program Files (x86)\IBM\WebSphere\AppServer\bin\manageprofiles.bat" -create -serverName Unica9103 -profileName Unica9103 -cellName UnicaVMUnica9103Cell -nodeName Unica9103 -hostName UnicaVM -profilePat h "C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\Unica9103" -templatePath "C:\Program Files (x86)\IBM\WebSphere\AppServer\profileTemplates\default" -a pplyPerfTuningSetting development -enableAdminSecurity false -winserviceCheck false -omitAction defaultAppDeployAndConfig -portsFile "C:\Program Files (x86)\IB M\WebSphere\AppServer\logs\manageprofiles\was_default_portdef.props" -signingCertDN "cn=10.0.2.15\\,ou=Root Certificate\\,ou=UnicaVMUnica9103Cell\\,ou=Unica9103 \\,o=IBM\\,c=US" -personalCertDN "cn=10.0.2.15\\,ou=UnicaVMUnica9103Cell\\,ou=Unica9103\\,o=IBM\\,c=US" -personalCertValidityPeriod 10 -signingCertValidityPeri od 15
Note that commas must be escaped with double backslashes or you get critical errors.
After success, you will receive the following:
INSTCONFSUCCESS: Success: Unica9103 profile now exists. For more information about this profile, refer to C: \ Program Files (x86) \ IBM \ WebSphere \ AppServer \ profiles \ Unica9103 \ logs \ AboutThisProfile.txt.