Epicor Sessions, DMT & PowerShell

I’ve been utilizing the DMT / PowerShell Rick Bird demo’d at InSights this year. it’s working great!

However, it does leave a lingering Epicor session for each DMT use in the Admin Console. Not the worst thing in the world, but I’d like to clean it up. Anyone know PowerShell script for ending the DMT session?

This is the script I’m using to call DMT:
Start-Process -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Update -Import "TE Labor Combined" -Source $Source "

Any help is appreciated,
Ben

1 Like

DMT version 4.0.21.0 applied a session management fix to release the Epicor session on exit. Which version of DMT are you using?

Dear Arthur,

Our DMT version is 3.0.6.24 for 10.0.700.4

Is there any issue with version?

Regards,

Jolem Chua

DMT Version 3.0.6.24 was released on 1st October 2015. A new version of DMT is released every month. You can update to the latest version of DMT by selecting ‘Check for Updates’ from the settings menu. This will also show you all the changes made to DMT since your version. You can back-up the DMT.exe and Epicor.DMT.Lib.dll files in the Epicor client folder if you want the option to revert to your previous version of DMT.

Arthur,
I am using Version 4.0.21.0 for 10.1.400.23

I have Task Manager (I meant Scheduler) running PowerShell as long as my machine is on, regardless of whether or not I am logged in. Usually I am not logged in at that time.
Ben

Do you mean Task Scheduler? I have set up a task in Task Scheduler that runs a PowerShell file that runs a couple of DMT Imports but DMT tidies up the session when the task finishes.

Arthur,
Thanks for pipping in on this!
I am running DMT version 4.0.21.0 for 10.0.700 and after the PowerShell runs the Epicor Sessions still show as available in the Epicor Administration Console. is it possible we have the PowerShell syntax wrong?

I have just retested this on 10.0.700.4 as the session management is different in 10.1 but the session was added to Epicor Admin Console while the PowerShell script was running and the session was removed from Epicor Admin Console once the script finished. My PowerShell script is almost identical to Ben’s example.

@estm8ben @Arthur
My PowerShell syntax is almost identical to Ben’s example as well but I am also running BAQ Exports before each load and I still had all these sessions hanging out in the Epicor Admin Console.

Last week I noticed and upgraded my DMT client for our 10.0.700.4 environment to 4.0.23.0 and I noticed the"BAQExport - fixed “Unable to cast…” issue and now releases session correctly" entry in the following change log for 4.0.23.0:

    DMT 4.0.23.0
Enhancements
	New Import - System > Company > Company Maintenance - support for the Epicor Company Maintenance screen
	PlayLists and PlayBooks - relative file paths are now relative to the PlayList / PlayBook rather than the Epicor client folder
	UI - Added button click effect

Fixes
	BAQExport - fixed "Unable to cast..." issue and now releases session correctly
	GL Journal Detail - fixed issue when updating multiple lines on the same header updating the wrong line 
	DMR Action - fixed Unrecognized Guid format error that can occur with Serial Numbers 
	PO Receipt Detail and PO Receipt Combined - fixed column error when importing SerialNo field
	Bill Of Materials - only calls update on the ECOMtl record if changes have been made - prevents deletion of RoHS records 
	Misc Detail - fixed Object Reference error that can occur in 10.1.500+ when changing the APTranTGLC record
	Supplier - fixed 1099 Code references invalid value error 

This morning when I checked the Epicor Admin Console sessions I did not see any ‘available’ sessions for our EpicorDMT user from the various weekend scheduled DMT PowerShell tasks. apparently what was causing my issue the the BAQExport in my PowerShell and that is why the sessions were not closing out.
Not sure who got this fixed but thanks a lot!

-Rick
www.getaligned.solutions

I just need to update DMT?

Looks that way to me.
Before I did that I deleted all my epicorDMT user sessions that had a status of ‘Available’ as they would never close.
And then I gave it a few days - the weekend and checked the Admin Console and it looked like the sessions were being handled properly for BAQ Export mode.

-Rick

I just ran the DMT update. I’ll check results tomorrow.
Thanks for the heads up!
Ben