Link to home
Start Free TrialLog in
Avatar of adam_daunhauer
adam_daunhauerFlag for United States of America

asked on

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?
Avatar of McKnife
McKnife
Flag of Germany image

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.
Avatar of adam_daunhauer

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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.