Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- From: faf1967 <faf1967@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 29 Jan 2009 13:38:01 -0800
I did need to register the prnadmin.dll on the machines. Once I did this it
worked. Thanks for the help
"Alan Morris [MSFT]" wrote:
I've never used the binary but I was under the impression it needed to be.
copied to \system32 or somewhere in a common path. I really do not what
(nor have time) to dig up and read the document on this.
XP is not in the cluster so I'm not clear on the failure question.
can you perform a list on the remote cluster, is there an error?
the user running the script should be admin on the remote print server.
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/search/?adv=1
This posting is provided "AS IS" with no warranties, and confers no rights.
"faf1967" <faf1967@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D229A697-1E83-4DD0-A2F9-52423F8713FB@xxxxxxxxxxxxxxxx
Alan,
Do you know a reason why I can run the prnport.vbs and prnmgr.vbs commands
successfully from some XP and windows 2003 machines/servers? From my
machine
the command is successful but from server not in the cluster it is not
successful.
Could this also mean I need to register the prnadmin.dll on that machine?
Thanks for your responses.
"Alan Morris [MSFT]" wrote:
I think Edwin is using the prnport.vbs script from the OS what uses the
WMI
interface to add the port. WMI does not support virtual names, just the
nodes, thus the creation of the port on the node.
Download the Windows Server 2003 resource kit and add prnadmin.dll to the
cluster nodes and use the associated scripts from the resource kit.. If
you
are running x64 clusters this will not work since the binary is x86.
There is more than one way to skin a cat (quite frankly I don't even
know
one way - the cat thing). If your running x64 we'll review the other
options.
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/search/?adv=1
This posting is provided "AS IS" with no warranties, and confers no
rights.
"faf1967" <faf1967@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0E1E5421-E79A-4AA7-8D87-BD5B60B65A5F@xxxxxxxxxxxxxxxx
Edwin...
Do you actually think I would post these scripts if it didnt work? I
manage
over 40 print servers with over 5,000 printers. These scripts work. I
used
this during our merger 2 months ago so I could automate the printer
creation
process for 1300 new printers.
Please let me know if you test this script on your network and it does
not
work. In your response include the commands you used.
"Edwin" wrote:
Like Dennis said allready. The .vbs tools like portmgr.vbs will only
add
the
port/printer on the physical node only. NOT in de cluster resource!
I'm desperate looking for a script to do it the right way!
"faf1967" wrote:
I hope this helps.
CREATES PORT
Portmgr.vbs -a -c \\VIRTUAL-PRINT-SERVER-NAME -p
IP_PRINTER-IP-ADDRESS -h
PRINTER-IP-ADDRESS -t raw -n 9100
CREATES PRINTER USING HP LASERJET DRIVER
prnmgr.vbs -a -c \\VIRTUAL-PRINT-SERVER-NAME -b PRINTER-NAME -m "HP
LASERJET
iiid" -r IP_10.160.132.233
SHARES PRINTER
setprinter \\VIRTUAL-PRINT-SERVER-NAME\PRINTER-NAME 2
"pShareName=PRINTER-NAME" "Attributes=+shared"
ENTERS INFORMATION IN THE LOCATION FIELD
rundll32 printui.dll,PrintUIEntry /Xs /n
"\\VIRTUAL-PRINT-SERVER-NAME\PRINTER-NAME" location "BBVA
INVESTMENTS"
ENTERS INFORMATION IN THE COMMENTS FIELD
rundll32 printui.dll,PrintUIEntry /Xs /n
"\\VIRTUAL-PRINT-SERVER-NAME\PRINTER-NAME" comment "10.160.132.233
HP
LASERJET P3005 "
CREATES DHCP RESERVATION
netsh dhcp server DHCP-SERVER-ADDRESS scope SCOPE-SUBNET add
reservedip
IP-ADDRESS-TO-BE-RESERVED MAC-ADDRESS PRINTER-NAME "PRINTER-NAME HP
LASERJET
P3005"
add security group give manage doc and print ( You will need to
download
setacl.exe http://setacl.sourceforge.net/)
setacl.exe -on \\VIRTUAL-PRINT-SERVER-NAME\PRINTER-NAME -ot
prn -actn
ace
-ace "n:DOMAIN-NAME\SECURITY-GROUP;p:man_docs,print"
setacl.exe -on \\VIRTUAL-PRINT-SERVER-NAME\PRINTER-NAME -ot
prn -actn
ace
-ace "n:DOMAIN-NAME\SECURITY-GROUP;p:man_docs,print"
removes Power Users
setacl.exe -on \\VIRTUAL-PRINT-SERVER-NAME\PRINTER-NAME -ot
prn -actn
trustee -trst "n1:Power Users;ta:remtrst;w:dacl"
removes Everyone
setacl.exe -on \\VIRTUAL-PRINT-SERVER-NAME\PRINTER-NAME -ot
prn -actn
trustee -trst "n1:EVERYONE;ta:remtrst;w:dacl"
removes creator owner c:\setacl.exe -on
\\VIRTUAL-PRINT-SERVER-NAME\PRINTER-NAME -ot prn -actn trustee -trst
"n1:CREATOR OWNER;ta:remtrst;w:dacl"
If you are working with HP printers and using telnet net the
following
VBS
script will rename the printer for you. Save this to a
Rename-HP-Printers.vbs.
The command is as follows.
Rename-HP-Printers.vbs IP-ADDRESS,PRINTER-NAME
Rename-HP-Printers.vbs 10.10.10.100,MY-TEST-PRINTER
Option Explicit
Dim ArgObj, FileName
Dim objShell, WshShell
Dim FSO, WSHs,vAppPath,RF,RL,ipadd,hostname,pos,has_error
set objShell = CreateObject("WScript.Shell")
Set ArgObj = WScript.Arguments
RL = ArgObj(0)
has_error = FALSE
If Instr(RL, ",") > 0 Then
pos = Instr(RL, ",")-1
ipadd=mid(rl,1,pos)
hostname = mid (RL,pos+2,len(RL)-pos)
' wscript.Echo "!" & hostname & "!"
objShell.Run("cmd")
WScript.Sleep 750
objShell.SendKeys "telnet " & ipadd
WScript.Sleep 750
objShell.SendKeys "{Enter}"
WScript.Sleep 750
objShell.SendKeys "HOST-NAME:" & hostname
WScript.Sleep 750
objShell.SendKeys "{Enter}"
WScript.Sleep 750
objShell.SendKeys "quit"
WScript.Sleep 750
objShell.SendKeys "{Enter}"
WScript.Sleep 750
objShell.SendKeys "y"
WScript.Sleep 750
objShell.SendKeys "{Enter}"
WScript.Sleep 750
objShell.SendKeys "{Enter}"
WScript.Sleep 750
objShell.SendKeys "exit"
objShell.SendKeys "{Enter}"
Else
has_error = TRUE
Wscript.Echo RL
End If
If has_error Then
Wscript.Echo " File has an error"
End If
WScript.Quit
"Dennis" wrote:
Hy,
I actually have a problem by creating a Printer Port on a Windows
2003
Cluster.
Cluster Configuaration:
2-Node active/active Cluster
each Node have 2 virtual PrintServer
By using the GUI "Serverproperties" to add Ports, it's all fine.
But I haven't found yet a method to do this by Script.
All available Scripts (prnmngr.vbs, prnport.vbs) create or edit
Ports
or
Printer for the Physical Node. Not really helpful.
I also tried to edit the Registry under:
HKLM\Cluster\Resources\<RecoureID>\Parameters\Monitors\Standard
TCP/IP
Port\Ports
This Method looks like it runs, but it doesn't synchronizes the
Entries to
the other Node.
Does anyone have a working method to create a TCP/IP Port onto a
virtualPrinter in MSCS.
I'm getting silly by adding Ports manualy with the GUI.
Please Help me......
- References:
- RE: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- From: Edwin
- RE: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- From: faf1967
- Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- From: Alan Morris [MSFT]
- Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- From: faf1967
- Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- From: Alan Morris [MSFT]
- RE: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- Prev by Date: Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- Next by Date: NLB
- Previous by thread: Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- Next by thread: Cannot join existing Cluster - Access is denied
- Index(es):
Relevant Pages
|