Creating and Sharing Printers with a Script
To create and share printers on a print server I downloaded prnadmin.dll and wrote a Visual Basic script. When I create printers on the local machine the script works fine. When I create printers on a remote machine the printers are created, but they are not shared. I get the error "The printer name is invalid" with the code 80070709 at the line containing the call to PrinterSet. This script is intended to work on Windows 2008 R2 64bit.
July 13th, 2010 12:34pm

There isn't really anything more to 80070709, # as an HRESULT: Severity: SUCCESS (0), Facility: 0x4c5, Code 0xc835 # as an HRESULT: Severity: FAILURE (1), Facility: 0x7, Code 0x709 # for hex 0x709 / decimal 1801 : SQL_1801_severity_16 sql_err # Database '%.*ls' already exists. ERROR_INVALID_PRINTER_NAME winerror.h # The printer name is invalid. # 2 matches found for "80070709" When you run the script, is it possible to use winrm and share the printer "locally" when you log on to the system over the network with WinRM? http://www.computerperformance.co.uk/powershell/powershell_remote.htm Once you are logged in remotely, you can use Powershell/WMI (the get-wmiobject and set-wmiobject cmdlets) or VBScript/WMI to share the printer, http://blogs.technet.com/b/heyscriptingguy/archive/2005/07/15/how-can-i-share-all-the-local-printers-on-a-computer.aspx -- Mike Burr
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2010 6:11pm

Sorry, I'm still not familiar with PowerShell and haven't much time to spend on this. A workaround could be, to create the printers temporarily on a local machine and then export them and import them on the cluster with the Print Manager.
July 14th, 2010 1:31pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics