Search code examples
powershellepicorerpepicor10

Epicor 10 DMT Tool Command Line Arguments


What is the command line flag to set the Environment in the Epicor DMT Tool? Running the powershell script below results in the DMT tool selecting the default database (live in this case). Setting the server with the "-server" flag did cause the DMT tool to connect to the correct environment either. Thanks.

$DMTPath = ""
$Server = ""
$Port = ""

#Set UI (0 = no ui, !0 = ui)
$ui=0
$User = ""
$Pass = ""

$Env = ""
$Path = "filepath

$Import = @("","")

$File = @("","")

for ($i=0; $i -lt $Import.length; $i++){

    $Source = $Path + $File[$i]
    echo "Loading... " 
    $Import[$i]
    echo "$Source"

    $Args = "-User $User -Pass $Pass -Add=true -Update=true -Import $Import[$i] -Source $Source "

    if($ui -eq 0){ $Args = $Args + " -noui"}

    Start-Process -Wait -FilePath $DMTPath -ArgumentList $Args
}

echo "Process complete, confirm uploads are correct"

Solution

  • Executing DMT.exe /? will display help for running DMT from the command line.

    I assume by environment you mean which of the instances i.e. pilot, test, live etc that you want to connect to. This is done as part of the ConnectionUrl:

    DMT.exe -ConnectionUrl=”net.tcp://localhost/Live” -Import=”Part” -Source=”C:\Imports\Part.csv” -Add=True -Update=True -user=manager -pass=manager
    

    You can get the connection url from a .sysconfig file in the client config folder.

    You may want to log on to and search http://epicweb.epicor.com for more documentation.