You can create a properties file with a text editor by specifying each argument, or option, using standard Java properties file format (name=value). For example, you can create a simple properties file that define a set of LDAP connection parameters as follows:
hostname=server1.example.com 
port=1389 
bindDN=cn=Directory\ Manager 
bindPassword=secret 
baseDN=dc=example,dc=com
Next, you can specify the location of the file using the --propertiesFilePath /path/to/ File option with the command-line tool. For example, if you save the previous properties file as bin/mytool.properties, you can specify the path to the properties file with ldapsearch as follows:
$ bin/ldapsearch --propertiesFilePath bin/mytools.properties "(objectclass=*)"
Properties files do not allow quotation marks of any kind around values. Any spaces or special characters should be escaped. For example,
bindDN=cn=QA\ Managers,ou=groups,dc=example,dc=com
The following is not allowed as it contains quotation marks:
bindDN=cn="QA Managers,ou=groups,dc=example,dc=com"