How to Map a Printer with Powershell 1.0
Well, I just finished presenting three shows in three cities in just two days in the great state of Ohio. The people here are amazingly smart and friendly, and they had many, great questions and comments. One of the questions came from the DANPA "loadfest" event in Dayton last night: "How do you map printers using Powershell 1.0?"
Well, I promised a post, and here it is - I did a bit of research and finally dug this helpful post from Guy Thomas on the computerperformance website. Please do not use the script below without first testing thoroughly in a non-production environment, and neither I nor Microsoft assumes any responsibility for any problems resulting from its use.
# PowerShell for Mapping a Printer
# Author: Guy Thomas
# Version 1.2 June 2008 tested on PowerShell v 1.0
$PrinterPath = "\\Server\PrintShare"
$net = new-Object -com WScript.Network
$net.AddWindowsPrinterConnection($PrinterPath)
For more information as well as common troubleshooting issues, please consult the original post. (See Example 4)
Comments
Anonymous comments are disabled
About shawnt
Shawn has been a Technology Specialist with Microsoft for the past six years, during which time he has presented to thousands IT Professionals, Partners, and Resellers. In his current position as TechNet Presenter, Shawn delivers briefings throughout the central United States on the full range of business products from Microsoft, with a focus on security-related technologies. The TechNet program is instrumental in providing IT professionals with information on evaluation, deployment, management, and ongoing operation of Microsoft technologies.
You will also see Shawn delivering product launches, live webcasts and hosting online chats through the TechNet chat program which he manages for the TechNet team. Shawn has also been quoted in local newspapers and appeared on several television shows across the U.S.