DMT Import Name

I am sure this is much more simple than I am making it, but I am having trouble specifying my “Import” DMT object name in my Powershell script.

I am trying to pass a CSV file to the “Sales Region” Import available in the DMT UI with the following Powershell command:

 $Source = "C:\Temp\VAL_Exports\SalesRegion.csv"  
 $DMTObj = "Sales Region"
 Start-Process -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Add -Update -Import $DMTObj -Source $Source -ConfigValue=Epicor10VAL" 

When I execute, I get a pop up error from DMT that “Import Sales does not exist”.
I have also tried putting “Sales Region” in place of the $DMTObj variable, but same results.

Am I missing something very obvious?

$DMTObj = """Sales Region"""
2 Likes

Thanks Dan!!

You can also do something like this

$Template = "Sales Region"
$DMTObj = '"{0}"' -f $Template
Start-Process -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Add -Update -Import $DMTObj -Source $Source -ConfigValue=Epicor10VAL"
2 Likes