How to script printer creation on a Windows Server 2008 R2 clustered print server?

Posted by Massimo on Server Fault See other posts from Server Fault or by Massimo
Published on 2011-07-27T16:39:56Z Indexed on 2012/04/02 23:32 UTC
Read the original article Hit count: 187

As per subject.

I've found some ways of scripting printer creation on Windows print servers using WMI, but it looks like WMI doesn't support clustered print servers (or clustered servers at all).

The scripts in C:\Windows\System32\Printing_Admin_Scripts are useless because, they are not cluster-aware and end up creating the printers on the active cluster node (just like using WMI).

The only tool I found that was able to work on a clustered print server is printui.exe (shortcut for rundll32 printui.dll, PrintUIEntry), but it can't create TCP printing ports: it can only add printers if the port already exists.

How can I completely script printer creation (including TCP printing ports!) on a clustered Windows Server 2008 R2 print server?

© Server Fault or respective owner

Related posts about windows-server-2008-r2

Related posts about scripting