How to Automate Network Connection Between Two Computers on the Same Network

Brian Myers 5 Reputation points
2023-08-09T13:39:43.9966667+00:00

I'm a database guy with a customer running a restaurant.
Their Point of Sale (POS) software is hosted on one Windows 10 PC (we'll call this the "POS PC") and there is another Windows 10 PC on the same network from which they want to perform reporting (we'll call this the "Reporting PC."

I have confirmed the two computers can "see" each other over the network.
However, the Reporting PC must provide login credentials for an existing User account on the POS PC.
Once entered, the Reporting PC can see the database on the POS PC.
We have confirmed this works.

Additionally, there are 5 other PCs which run the POS system which successfully connect to the POS PC (and its database) over the network.

They want the reporting to be completely automated.
I've got the database piece covered with no problems.
However, my Networking knowledge is somewhat lacking on how best to fully automate the credentialing piece of this.

I have no problems or questions about connecting to the POS database and running reports.
I've already tested this aspect and I'm good there.

The only real challenge is automating the connection between the POS PC and the Reporting PC or establishing a permanent connection which doesn't require login credentials.

In the old days, I'd open up the network and simply map a network drive to the POS PC on the Reporting PC.
This would easily allow me to establish a link to the tables in the POS database via the network mapped drive.
I assume this could still be done except I'm not sure of the configuration necessary on the POS PC to enable this.
Also, I'm not sure of the exposure this may imply for the POS PC from unwanted connections via the network from nosy or curious idle employees on the other computers.

The most secure method would seem to be to automate the authentication process on the Reporting PC.
Could this be done with PowerShell?
Is there some other Microsoft tool to accomplish this automation?

From my personal perspective, I'd rather just be able to map a network drive on the Reporting PC.

It seems I could do the mapped drive after entering the credentials but then anytime either PC is restarted, the credentials would again be needed before the mapped drive could reconnect. So that would again need to be automated in that scenario.

Any advice or suggestions will be greatly appreciated but remember I'm a Db guy, not a networking guy so probably more details than less would help.
Thanks in advance.

Windows for business Windows Client for IT Pros Networking Network connectivity and file sharing
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2023-08-09T17:55:21.2833333+00:00

    Can't you just use the "NET USE . . . " command to supply the credentials and, at the same time, make the mapping persistent?

    https://www.lifewire.com/net-use-command-2618096 (among many other links!)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.