# DMT Powershell Help

**URL:** <https://www.epiusers.help/t/dmt-powershell-help/42438>\
**Category:** Epicor ERP 10\
**Created:** [January 26, 2018, 9:02pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438 "2018-01-26T21:02:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tse.dba](https://www.epiusers.help/user_avatar/www.epiusers.help/tse.dba/32/8690_2.png) [@tse.dba](https://www.epiusers.help/u/tse.dba)\
**Post date:** [January 26, 2018, 9:02pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/1 "2018-01-26T21:02:42Z")

</div>

So I am trying to create a powershell script to import data into the Product Group table. I use the following script:

Start-Process -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Delete **-Import “Product Group”** -Source $Source "

I get this message:  
 ![image](https://epiusers.help/uploads/default/original/2X/8/837e3b745e5c771a94b142f67bc42159fa3dac2a.png)

So my Import variable is not accepting spaces. How do I get it to except spaces.

It works fine with “Part”, because no spaces.

Thanks!

---

<div class="post-metadata">

**Author:** ![duckor](https://www.epiusers.help/user_avatar/www.epiusers.help/duckor/32/611_2.png) [@duckor](https://www.epiusers.help/u/duckor)\
**Post date:** [January 26, 2018, 9:33pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/2 "2018-01-26T21:33:10Z")

</div>

Have you tried single quotes?

---

<div class="post-metadata">

**Author:** ![markdamen](https://www.epiusers.help/user_avatar/www.epiusers.help/markdamen/32/54917_2.png) [@markdamen](https://www.epiusers.help/u/markdamen)\
**Post date:** [January 27, 2018, 12:28am UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/3 "2018-01-27T00:28:01Z")

</div>

I ended up doing it like this:

$ImportName = ‘“Part Warehouse”’  
Start-Process -Wait -FilePath $DMTPath -ArgumentList “-SSO -Add -Import $ImportName -Source $Source1”

---

<div class="post-metadata">

**Author:** ![Rick\_Bird](https://www.epiusers.help/user_avatar/www.epiusers.help/rick_bird/32/77664_2.png) [@Rick\_Bird](https://www.epiusers.help/u/Rick_Bird)\
**Post date:** [January 28, 2018, 12:27am UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/4 "2018-01-28T00:27:09Z")

</div>

Been there done that… it’s a pain.  
You need to use the PowerShell escape character, the ‘backtick’ AKA, ‘grave accent.’ This is usually the key to the left of the 1 key.

```
-Import `"Product Group`"

```

At Insights last year I did a session on DMT PowerShell and I covered this struggle, examples and such are on my blog:

> **[Epicor Insights 2017: DMT PowerShell Session](http://www.alignedsolutionsconsulting.com/epicor/epicor-insights-2017-dmt-powershell-session/)**
>
> As I previously announced, I presented two sessions at Epicor Insights 2017: Tuesday: DMT PowerShell Scripts, Lessons Learned Thursday: Epicor Search Tools. Here is the content of the DMT PowerShel…

---

<div class="post-metadata">

**Author:** ![tse.dba](https://www.epiusers.help/user_avatar/www.epiusers.help/tse.dba/32/8690_2.png) [@tse.dba](https://www.epiusers.help/u/tse.dba)\
**Post date:** [January 29, 2018, 1:38pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/5 "2018-01-29T13:38:49Z")

</div>

Thanks! That worked. I did find something about backticks. I didnt know how to lay them out.

---

<div class="post-metadata">

**Author:** ![tse.dba](https://www.epiusers.help/user_avatar/www.epiusers.help/tse.dba/32/8690_2.png) [@tse.dba](https://www.epiusers.help/u/tse.dba)\
**Post date:** [January 29, 2018, 5:36pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/6 "2018-01-29T17:36:22Z")

</div>

Is there a way to run it without the DMT interface popping up?

---

<div class="post-metadata">

**Author:** ![Rick\_Bird](https://www.epiusers.help/user_avatar/www.epiusers.help/rick_bird/32/77664_2.png) [@Rick\_Bird](https://www.epiusers.help/u/Rick_Bird)\
**Post date:** [January 29, 2018, 5:44pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/7 "2018-01-29T17:44:30Z")

</div>

Yes just include the -NoUI argument:

```
Start-Process -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Update -Import `"Sales Order Header`" -NoUI -Source $Source "

```

I did not include the -NoUI in some of my examples since the Task Scheduler was calling the PowerShell script and so it’s not really needed.

-Rick Bird  
www.getaligned.solutions

---

<div class="post-metadata">

**Author:** ![tse.dba](https://www.epiusers.help/user_avatar/www.epiusers.help/tse.dba/32/8690_2.png) [@tse.dba](https://www.epiusers.help/u/tse.dba)\
**Post date:** [January 29, 2018, 5:52pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/8 "2018-01-29T17:52:34Z")

</div>

Where can i find a list of arguments?

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [January 29, 2018, 5:58pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/9 "2018-01-29T17:58:23Z")

</div>

Mostly on Facebook.

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [January 29, 2018, 6:00pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/10 "2018-01-29T18:00:49Z")

</div>

DMT /? will give them to you if run at the command line.

Mark W.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [October 5, 2018, 6:47pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/11 "2018-10-05T18:47:29Z")

</div>

So I am trying to get a powershell script to run a simple DMT load (trying to learn something today). I am not having any success, and I can’t really tell what I am doing wrong. Can someone take a quick look at tell my why this wouldn’t work? We run this is DMT all of the time.

```auto
$DMTPath = "C:\Epicor\ERP10.2Client\Client\DMT.exe"
$User = "user"
$Pass = "password"
$source = "C:\Users\banderson\Desktop\A1 MasterComment.csv"

Start-Procss -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Update -Import `"Bill Of Operations`" -Source $Source "

```

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [October 5, 2018, 6:55pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/12 "2018-10-05T18:55:00Z")

</div>

never mind. Typo, “Process” 🤦‍♂️

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [October 5, 2018, 6:55pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/13 "2018-10-05T18:55:12Z")

</div>

> [@Banderson](#):
>
> ```auto
> Start-Procss -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Update -Import `"Bill Of Operations`" -Source $Source "
> 
> ```

Try

```
Start-Process -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Update -Import `Bill Of Operations` -Source $Source "

```

I don’t think you want the double quotes are the Bill of Material, going from memory here.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [October 5, 2018, 6:57pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/14 "2018-10-05T18:57:40Z")

</div>

it worked when I fixed the typo.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [October 5, 2018, 6:59pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/15 "2018-10-05T18:59:33Z")

</div>

> [@Mark\_Wonsil](#):
>
> going from memory here.

You didn’t need to go from memory, you just had to scroll up! 😆 Thanks @Rick_Bird for the examples.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [October 5, 2018, 7:06pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/16 "2018-10-05T19:06:48Z")

</div>

ok new problem. I had a inkling that it was spaces in the file location that was giving my a problems, so I copied a sample file and removed spaces. It still didn’t work, so I kept going and found the typo.

Now when I put it back to the actual file name, it bombs out at the space. Is there a way to handle spaces in file name/locations in powershell?

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [October 5, 2018, 7:49pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/17 "2018-10-05T19:49:26Z")

</div>

Is it not possible to force the input files to use underscores (or no spaces at all)?

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [October 5, 2018, 7:50pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/18 "2018-10-05T19:50:35Z")

</div>

It’s possible. It’s just already set up, so changing it is extra work that I don’t want to do if I don’t have to.

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [October 5, 2018, 7:56pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/19 "2018-10-05T19:56:29Z")

</div>

I figured as much. If it was me, I’d spend the time figuring out how to pass arguments with quotes in them. Just because I’d refuse to be beat!

How about:

```auto
$argList = "User $User -Pass $Pass -Update -Import `"Bill Of Operations`" -Source `"$Source`" "

```

In case it’s not obvious, I added the grave and quote, before and after the var $Source, keeping the close quote

**EDIT: THIS DON’T WORK!!!**

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [October 5, 2018, 7:59pm UTC](https://www.epiusers.help/t/dmt-powershell-help/42438/20 "2018-10-05T19:59:17Z")

</div>

That doesn’t work at all…

[Next page](https://www.epiusers.help/t/dmt-powershell-help/42438.md?page=2)
