Windows Share sessions not releasing

I have a Windows 10 64-bit PC that is being used for a scale system.
The scale system creates tickets that append to a file.
That file is then grabbed by an Active Batch job every 15 minutes.

Problem: Every 15 minutes the job takes the file and then when the active batch job disconnects the Session does not release from the Computer Management Sessions windows.
So this gets up to the 20 in 5 hours and then starts to fail due to the connection restrictions being 20 in Windows 10 64-bit for Shares.

What can I do to get these connections to release when the Active Batch job is complete or any other solution?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can do a lot of things at the server side, restart the service "server" for example, or use net session or net file to disconnect distinct sessions/files.
net help session
net help file
to get an idea.

The service restart would be
net stop server & net start server.
adam_daunhauerAuthor Commented:
This is not a server it is a PC.
I can create a task scheduler item to do the net stop server & net start server which does serve my purpose, but when it runs it takes focus to the command window.
Let the task run as system account so it will not steal focus but run invisible.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

adam_daunhauerAuthor Commented:
That worked so I will mark that as the solution, but the team that scheduled the active batch job ended up putting some command in on the job to take over one of the existing connections every time they connect in. That way the number is not increasing.
adam_daunhauerAuthor Commented:
This is what they said:
I added a "net use /delete ${Location_Server}" to each of the affected jobs and added a "/persistent:no" to the net use connection in job. Connections are no longer hanging after each job is run.
Thanks for sharing.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.