How to printer to a local printer when on VPN

I need to be able to share a printer when a computer is connected to the VPN.
My theory is that  the printer will need to be shared, before it can be printed to, when a VPN connection is established.
The OS is Windows 10
My other ideas is to uninstall the printer and install it when I am connected to the VPN.
I imagine there is a solution to this challenge.
I do not recall the other steps I tried, but I believe the one solution to the problem is to configure a Cisco ASA.
I was also thinking that I will have to enable the wireless printer's IP as an exception on the firewall.

Maybe I need to create a script with Powershell, to first configure the printer to print to a file then send it directly to the print queue.
MAsked:
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.

nociSoftware EngineerCommented:
This normally has nothing to do with sharing.
When on VPN the network routes are changed therefore the local resources are not reachable any more.

You could try to add a Host route  to the IP address of the printer before opening the VPN.  (if on the same subnet)
or a specific host route to the printer through the default gateway if on a different subnet.
(a route with netmask = 32 or 255.255.255.255).   In most case those routes will still work (they need one such route to get to the default gateway f.e.).
KimputerIT ManagerCommented:
Printing through a shared printer, is communication purely between 2 PC's. If the VPN is working properly, and your PC is connected and it's part of the network, other PC's in the original fixed LAN should be able to print to your with the \\YOURPC\Printer as if you were also part of the fixed LAN there. Obviously if VPN traffic to your PC is limited by the firewall, they can't connect.
But all that's needed should only be a ONE time rule setting. The whole uninstall/install thing shouldn't be necessary at all.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
I assume you have a Cisco AnyConnect VPN running, and it is configured to redirect all traffic (including local and Internet traffic) to the office. Then the only way to get it work is a configuration change on the ASA, commonly called "split tunneling", which only redirects traffic targetting the office LAN.
As has been said above, your issue is not related to installing or sharing. You cannot set routes either, because they are overruled by the VPN client.

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
nociSoftware EngineerCommented:
Setting routes did work for me in the past... maybe because the settings were not tight on the central systems.
Hence the suggestion to try them at least.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Whether you can trick the VPN client depends on the client and its corresponding device configuration. Cisco clients remove all routing info while connected, even if added after connecting.
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
Operating Systems

From novice to tech pro — start learning today.