RE: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr



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......
.



Relevant Pages

  • Re: Monitor Cluster
    ... Basically I need to know when a failover occurs and from time to time I also need to know in witch physical node is a given cluster running. ... I need a script that I can use against the Virtual name or virtual ip of a given cluster in the network, and that script should give me the active node where the cluster is running, is this possible? ...
    (microsoft.public.windows.server.clustering)
  • RE: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
    ... over 40 print servers with over 5,000 printers. ... Please let me know if you test this script on your network and it does not ... By using the GUI "Serverproperties" to add Ports, ... Printer for the Physical Node. ...
    (microsoft.public.windows.server.clustering)
  • Re: Monitor Cluster
    ... the default connection is to root\default. ... You'll also need to append your cluster or server name to ... also need to know in witch physical node is a given cluster running. ... I need to have the ability using a script or perhaps another tool against ...
    (microsoft.public.windows.server.clustering)
  • Re: Monitor Cluster
    ... strComputer = "Enter Cluster Name Here" ... Set colItems = objWMIService.ExecQuery("Select * from ... also need to know in witch physical node is a given cluster running. ... I need to have the ability using a script or perhaps another tool against ...
    (microsoft.public.windows.server.clustering)
  • Re: reboot a 2 node file cluster
    ... Look into using either Cluster Administrator or cluster.exe with the move ... In the past we have simply logged on to physical node 2, shut it down, ... waiting ffor virtual node 2 to fail over to physical node 1 then shutdown ...
    (microsoft.public.windows.server.clustering)

Loading