DMT through PowerShell

Maybe it was just for my version - 10.1.600.37
But my automation through PowerShell of DMT last night failed.
When I investigated, seems DMT had an update to install. This update failed. This made my DMT not process. The domino effect results in my automated functions failed.
Once I opened DMT manually and realized its update couldn’t restart the software - error said DMT still running, I used Task Manager to kill the DMT from running. Then the DMT update would install and restart DMT as it was programmed.
Now, I test my PowerShell scripts and they can run again.
Again, this may just be for me.

TL::DR If you reply on PowerShell automation and DMT, make sure they ran in the last 24 hours.

Another option is in your production run, launch DMT with the -DisableUpdateService flag and it won’t try to update.

For all DMT switches, run

dmt.exe /?
5 Likes

That’s very helpful!
Thanks!

Based on what you’re saying I should change this:

$DMTPath = “C:\Epicor\ERP10.1Client\Client\DMT.exe”

to this:

$DMTPath = “C:\Epicor\ERP10.1Client\Client\DMT.exe /?”

$DMTPath = "C:\Epicor\ERP10.1Client\Client\DMT.exe -DisableUpdateService "
1 Like

But with normal quotes (" "), not the fancy ones(“ ”). :wink:

1 Like

Or should that be a part of the -ArgumentList"

Start-Process -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Export -BAQ LateSales -Target $Source -NoUI -ConfigValue=EpicorERP10"

Yes, that’s exactly where it should go. We didn’t see that part of your script earlier.

1 Like

Great tip Mark. I just tried this and when it displays all DMT switches, it does so in a new window which is too tall for my monitors, so I can’t see what is at the end of this window or how many more switches there are. Is there a way to make DMT display the switches within the powershell console rather than a pop-up window?

1 Like

I was able to fiddle with my remote desktop settings to make the DMT switches window fit. Though too small to read on those settings, I was able to use the Snipping tool and save the image. Now I can zoom in on the image and scroll.

Here it is if anyone else is wondering:

PS: what on earth were they thinking making a pop-up window this long? No one has a monitor that size.

2 Likes

Hi Aaron,
You just have to click on the dialog, and press CTRL+C and CTRL+V on Notepad(++) and zoom+ on to get a larger font size.

4 Likes

Why wouldn’t they just return text on the command line like every other application ever made?