title: Epicor 10 DMT Tool Command Line Arguments
body: <p>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.</p>
  
  <pre><code>$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"
  </code></pre>