We have a script that we use to copy our Live Environment to another, say Pilot. We want to automate this process but looking at what i currently do now i am wondering if anyone has a script that can automate certain things.
The current process we need to do the following before we copy over Pilot -
Prior to running
----- Disable Pilot Task Agent (Can this be automated)
----- Stop Pilot App Pool (Can this be automated)
– After Running
----- Regenerate Datamodel if required,
----- Start Pilot App Pool, (Can this be automated)
----- Check BPMS to Disable,
----- Enable Schedules as required
----- Start Pilot Task Agent. (Can this be automated)
Can they be automated?
Does anyone have anything that they use that they would happily share?
Thanks
Hally
(Simon Hall)
July 8, 2026, 11:13am
2
There are various posts on this topic here. Sor for not being that helpful, the search is pretty good.
The other resource you want to loon at is the administrattion command line reference which is available on Epicweb and IIRC in the online help.
You can use the command line to regenerate data model, restart app pools and even deploy a whole app server.
I believe nyherenis a post about that here also.
MikeGross
(Mike Gross)
July 8, 2026, 12:08pm
3
Not sure if your script includes it, but there are like a dozen or more things you need to do to the pilot environment, some of which include
redirecting the agent’s data folder (epicordate vs epicorpilotdate)
disabling or changing accessory apps data (Qucikship and Avalara urls, or any other product)
changing outbound emails originator or text to indicate they are from the Pilot system instead of Prod
changing theme, colors, or company names to indicate Pilot
Agent schedules - disable or alter
you know, stuff like that. There are A LOT of things you configured over the years so take a hard look and see what else you need to adjust.
Hi Mike, you are correct and the script does include those that you have listed that we need to take into consideration
Hally
(Simon Hall)
July 8, 2026, 12:34pm
5
ok here’s a link to a version
https://www.epiusers.help/t/how-to-automatically-replicate-an-entire-environment-for-development-and-testing/84540
Kudos @SteveFossey
examples of using the cli tools… No warranty
REM Create a TA
@echo off
cd C:\Program Files (x86)\Common Files\Epicor Software\Application Server Manager Extensions\4.2.100\TaskAgentConfiguration
TaskAgentServiceConfiguration.exe /Action=ADDNEW -configfile="\\APPSERVERHOST\c$\EpicorAutomation\AutomateTest\config\TaskAgentConfig.xml" -LogFile="\\APPSERVERHOST\c$\EpicorAutomation\AutomateTest\logs\TaskAgentLog.txt"
REM DELETE A TA
@echo off
cd C:\Program Files (x86)\Common Files\Epicor Software\Application Server Manager Extensions\4.2.100\TaskAgentConfiguration
TaskAgentServiceConfiguration.exe /Action=DELETE -configfile="\\APPSERVERHOST\c$\EpicorAutomation\AutomateTest\config\TaskAgentConfig.xml" -LogFile="\\APPSERVERHOST\c$\EpicorAutomation\AutomateTest\logs\TaskAgentLog.txt"
TaskAgentConfig.xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<taskAgentConfiguration>
<agent>
<action></action>
<name>Epicor_Test</name>
<enabled>True</enabled>
<appserverUrl>net.tcp://APPSERVER</appserverUrl>
<binding>Windows</binding>
<userId></userId>
<userPassword></userPassword>
<operationTimeout>86400</operationTimeout>
<maxConnectionAttempts>10</maxConnectionAttempts>
<maxConcurrentTasks>20</maxConcurrentTasks>
<validateWcfCert>false</validateWcfCert>
<dnsEndpointIdentity />
<restartDelay>45</restartDelay>
</agent>
</taskAgentConfiguration>
</configuration>
REM REGEN DM
TITLE Generate Data Model
echo Generating Data Model ....
cd "C:\Program Files (x86)\Common Files\Epicor Software\Database Manager Extensions\4.2.100\DataModelGenerator"
.\Ice.Tool.DataModelGenerator.CL.exe /ConfigFile="c:\EpicorAutomation\AutomateTest\config\GenerateDataModel.xml" /LogFile="c:\EpicorAutomation\AutomateTest\logs\GenerateDM.txt"
GenerateDataModel.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<dataModelGenerator>
<ServerName>DBSERVER</ServerName>
<DatabaseName>Epicor_Test</DatabaseName>
<authenticationMode>Windows</authenticationMode>
<SchemasToInclude/>
<TablesToExclude>Ice.SysSequence,Ice.DBMigrationLog</TablesToExclude>
<TargetLocation/>
</dataModelGenerator>
</configuration>