Bat file to map shared printer
The batch file comes to help you in this situation where you can schedule that or to configure on GPO. In this way, you war automate the creation of network drive on your network devices.
If you want to map multiple drives just keep repeating steps 2 and 3. Change the later and the path if it is different.
What if you need to map a drive form a computer on the network that you have administrator access? Yes is simply easy just you need to change a part of the net use command:.
Mapped drives are not persistent by default and to do that you need to use some cmd commands. By default, if we use the command above to map drive the mapped drive would disappear after you restarted the computer.
Also, future connections during the same session will be also persistent. Future connections will not be persistent until you turn the toggle back on. The PowerShell commands differ from cmd commands so below we will explain the equivalent command:.
This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread. I have the same question Report abuse. Details required :. Cancel Submit. Previous Next. Charlie Klausen Independent Advisor. Hi JDem, We should be able to accomplish this, given you know the printer server name, and the names of the printers you are trying to add. I just made some recently for this very purpose. Just need to locate them. How satisfied are you with this reply?
Connect and share knowledge within a single location that is structured and easy to search. I have a report and files that i have to print using the batch file. What i want is the file to be printed using shared printer. Any help. Alternatively you could just change the default printer before running your original command.
How are we doing? Please help us improve Stack Overflow. Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 7 years, 8 months ago.
0コメント