Utility command group of the AdminTask object

You can use the Jython or Jacl scripting languages to manage servers with the wsadmin tool. The commands and parameters in the Utility group can be used to change the host name of a node, to query for the name of the deployment manager, and to determine if the system is a single server or network deployment.

The Utility command group for the AdminTask object includes the following commands:

changeHostName

Use the changeHostName command to change the host name of a node.

Avoid trouble: The IPC Connector and Multicast endpoints are special endpoints. Do not modify these endpoints with the changeHostName command.

Target object

None

Parameters and return values

-hostName
The new host name. (String, required)
-nodeName
The name of the node whose host name will be changed. (String, required)

Optional parameters:

-systemName
The name of the z/OS system on which this node will run. This field is only required if a node is to be moved from one system to another, for example, form system SYSA to system SYSB. If you are not sure of the value you should specify for this parameter, issue the IPLINFO command on your z/OS system, and use the name that displays in the Sysname= field as the value for this parameter.
Note: When you run the changeHostName command interactively, the systemName parameter appears, but is only to be used for a z/OS system. The systemName parameter represents the z/OS system name that is defined in the server.xml file as a value for property, was.ConfiguredSystemName. When the systemName parameter is selected, this property is changed.
-regenDefaultCert
A request to regenerate default certificates. The only valid value for this parameter is "true" if you want to regenerate default certificates. Any other value assumes to NOT regenerate default certificates. The string argument is processed as a boolean. The boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string "true". The regenDefaultCert parameter operates like AdminTask.createChainedCertificate and has the following default values:
  • -keyStoreName "NodeDefaultKeyStore"
  • -keyStoreScope "(node):" + nodeName
  • -certificateAlias" "default_" + hostName
  • -certificateCommonName" nodeName
  • -certificateOrganization" "IBM"
  • -certificateOrganizationalUnit" nodeName
  • -certificateCountry "US"
Note: For both AdminTask.createChainedCertificate and the regenDefaultCert parameters, if using the dmgr node the -keyStoreName value changes to -keyStoreName "CellDefaultKeyStore", and the -keyStoreScope value to -keyStoreScope "(cell):" + cellname.

The switch is a convenience switch that makes assumptions about the default values of the certificate parameters. If the default values are not used, then AdminTask.createChainedCertificate or regenDefaultCert should be used instead.

Be aware of these functional details:
  • keyStoreName and keyStoreScope are not valid with the regenDefaultCert parameter.
  • When you run the changeHostName command, you cannot specify certificateCommonName (CN of new certification). To specify a new hostname as the CN, you need to use AdminTask.createChainedCertificate .

Examples

Batch mode example usage:
  • Using Jacl:
    $AdminTask changeHostName {-hostName host_name -nodeName node_name 
    -systemName system_name}       
  • Using Jython string:
    AdminTask.changeHostName('-hostName host_name -nodeName node_name 
    -systemName system_name') 
  • Using Jython list:
    AdminTask.changeHostName(['-hostName', 'host_name', '-nodeName', 'node_name',
    '-systemName', 'system_name'])

Interactive mode example usage:

  • Using Jacl:
    $AdminTask changeHostName {-interactive}
  • Using Jython string:
    AdminTask.changeHostName ('[-interactive]')
  • Using Jython list:
    AdminTask.changeHostName (['-interactive'])

getDmgrProperties

Use the getDmgrProperties command to return the name of the deployment manager.

Target object

None

Parameters and return values

  • Parameters: None
  • Returns: The name of the deployment manager in a network deployment system. Returns an empty string if the system is a single server.

Examples

Batch mode example usage:

  • Using Jacl:
    $AdminTask getDmgrProperties {}
  • Using Jython:
    AdminTask.getDmgrProperties()

Interactive mode example usage:

  • Using Jacl:
    $AdminTask getDmgrProperties {-interactive}
  • Using Jython string:
    AdminTask.getDmgrProperties ('[-interactive]')
  • Using Jython list:
    AdminTask.getDmgrProperties (['-interactive'])

isFederated

Use the isFederated command to check if the system is a single server or network deployment.

Target object

None

Parameters and return values

  • Parameters: None
  • Returns: Boolean. true if the system is a network deployment system. Otherwise it returns false.

Examples

Batch mode example usage:
  • Using Jacl:
    $AdminTask isFederated {}
  • Using Jython string:
    AdminTask.isFederated ()

Interactive mode example usage:

  • Using Jacl:
    $AdminTask isFederated {-interactive}
  • Using Jython string:
    AdminTask.isFederated ('[-interactive]')
  • Using Jython list:
    AdminTask.isFederated (['-interactive'])