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?
adam_daunhauerAsked:
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.

McKnifeCommented:
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.
Type
net help session
or
net help file
to get an idea.

The service restart would be
net stop server & net start server.
0
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.
0
McKnifeCommented:
Let the task run as system account so it will not steal focus but run invisible.
0

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
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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.
0
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.
0
McKnifeCommented:
Thanks for sharing.
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.