RE: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- From: Edwin <Edwin@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 7 Jan 2009 08:54:01 -0800
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......
- Follow-Ups:
- Prev by Date: Re: File Shares
- Next by Date: Cannot join existing Cluster - Access is denied
- Previous by thread: Re: How to migrate 32 bit to 64 bit cluster?
- Next by thread: RE: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
- Index(es):
Relevant Pages
|
Loading