MYOB Acumatica Command-Line Tool: General Information
In MYOB Acumatica, you can deploy a new application instance and perform database and application maintenance tasks by using the command-line tool.
This topic provides an overview of how you can use the MYOB Acumatica command-line tool instead of the MYOB Acumatica ERP Configuration Wizard.
Learning Objectives
In this chapter, you will do the following:
- Become familiar with the MYOB Acumatica command-line tool and its syntax
- Review some examples of using command-line commands to deploy instances and perform maintenance tasks by using the MYOB Acumatica command-line tool
- Deploy an out-of-the-box MYOB Acumatica instance from a configuration file by using the MYOB Acumatica command-line tool
Applicable Scenario
You may need to learn how to use the MYOB Acumatica command-line tool if you are a system administrator who prefers to use command-line commands to deploy a new instance and to perform some maintenance tasks without using the MYOB Acumatica ERP Configuration Wizard.
The MYOB Acumatica Command-Line Tool
The MYOB Acumatica command-line tool is an executable file with the ac.exe
name. By
default, ac.exe
is located in the folder on the computer that has MYOB Acumatica installed, which is C:\Program Files (x86)\MYOB Acumatica\Data\
.
When you run ac.exe
, you supply a set of command-line parameters, where
each parameter must be presented in the following format.
-parameter:"parameter value"
When you pass a command-line command to the MYOB Acumatica command-line tool, you should use the following syntax.
ac.exe [-f|-file:"path to configuration file"] [-cm|-configmode:"main scenario"]
[-s|-dbsrvname:"server name"] [-sw|-dbsrvwinauth:"True|False"]
[-u|-dbsrvuser:"username"] [-p|-dbsrvpass:"user password"]
[-d|-dbname:"database name"] [-n|-dbnew:"True|False"]
[-b|-dbupdate:"True|False"] [-dm|-dbmode:"Regular|Template|Demo"]
[-dz|-dbsize:"database size in GB"] [-ds|-dbskip:"True|False"]
[-dc|-dbshrink:"True|False"] [-i|-iname:"instance name"]
[-io|-ioldname:"old instance name"] [-h|-ipath:"instance directory"]
[-is|-vmsize:"Small|Medium|Large|ExtraLarge"]
[-it|-trumbprint:"X.509 thumbprint"][-w|-swebsite:"Web site name"]
[-v|-svirtdir:"virtual directory"] [-po|-spool:"application pool"]
[-a|-sactions:"AnonymousUser|SelectedUser"]
[-k|-suser:"username"] [-m|-spass:"user password"]
[-dw|-dbwinauth:"True or False"] [-dn|-dbnewuser:"True|False"]
[-du|-dbuser:"username"] [-dp|-dbpass:"user password"]
[-cs|-securemode:"True|False"] [-c|-company:"[ci|CompanyID=company ID];
[cp|ParentID=parent company ID]
[cv|Visible=True];[ct|CompanyType=True]; [cn|LoginName:username];
[cd|Delete:True]"] [-op|-output:"Normal|Quiet|Forced"]
All parameter values in the command-line commands are case-sensitive and must be enclosed in quotation marks. Each parameter for the command line also has a short form that you can use instead of the full parameter name. If you have specified a parameter more than once in a command line, the last parameter value will be used.
You can run ac.exe
in one of three modes:
- Command-line: Parameters are passed to
ac.exe
from the command line. - Batch: The path to the configuration file with parameters is passed to
ac.exe
from the command line. - Mixed: Some parameters are passed to
ac.exe
through the configuration file, while other parameters are passed from the command line. In this mode, command-line parameters have priority over those specified in the configuration file.
For details about possible parameters and their values, see MYOB Acumatica Command-Line Tool: Possible Parameters and Values.
Deployment of an Instance by Using the MYOB Acumatica Command-Line Tool
You can use a configuration file to deploy an MYOB Acumatica instance with the MYOB Acumatica command-line tool. You can create the configuration file with the command-line commands automatically by running the MYOB Acumatica ERP Configuration Wizard. For details, see MYOB Acumatica Command-Line Tool: To Deploy an Instance by Using the Configuration File.
You can also deploy an instance manually by using the command-line commands that you pass
to ac.exe
, as shown in the following examples:
-
ac.exe -configmode:"NewInstance" -dbsrvname:"GP" -dbname:"JPMorgan" -company:"CompanyID=1;CompanyType=;LoginName=;" -company:"CompanyID=2;CompanyType=;ParentID=1;Visible=Yes; LoginName=JPMorgan;" -iname:"JP Morgan" -ipath:"C:\Program Files\Program Folder\JP Morgan\\" -swebsite:"Default Web Site" -svirtdir:"JPMorgan" -spool:"JPMorgan" -sactions:"SelectedUser" -suser:"GP\Administrator"
-
ac.exe -cm:"NewInstance" -s:"SM" -d:"InstanceDB" -c:"ci=1;" -c:"ci=2;cp=1;ct=Demo;cv=True;cn=Company;" -i:"Instance" -h:"C:\Program Files (x86)\Program Folder\Instance" -w:"Default Web Site" -v:"Instance" -po:"Classic .NET AppPool" -a:"AnonymousUser"
The command in this example also creates an application instance and uses the short forms of the command-line parameters.
Maintenance of an Instance by Using the Command-Line Commands
You can use the following examples of command-line commands, which you pass to
ac.exe
to perform some maintenance tasks in MYOB Acumatica.
The following command updates an existing database.
ac.exe -configmode:"DBMaint" -dbsrvname:"SM" -dbnew:"False" -dbname:"DotNet4"
-dbupdate:"True"
The following command updates an existing application instance.
ac.exe -cm:"UpgradeSite" -i:"Instance"
The following commands can be used to switch on full logging mode and save full logs of instance updates in the Log.txt file:
- Short parameter name:
ac.exe -fl:"Yes"
- Full parameter name:
ac.exe -fulllog:"Yes"
For details about full logging mode, see Instance Deployment: Creation of an Instance.