Link to home
Create AccountLog in
Windows Server 2003

Windows Server 2003

--

Questions

--

Followers

Top Experts

Avatar of FedexAdmin
FedexAdmin

Unable to successfully add ports and configure print queues on a Windows 2003 Print Cluster using prnport.vbs and prncnfg.vbs
I am attempting to write an application that allows our Support Desk to remotely add or redirect print queues on our print servers.  The problem I'm seeing is that our unclustered print servers allow me to add ports and update queues using prnport.vbs and prncnfg.vbs as shown in my examples below. However, I'm receiving errors when attempting to do the same thing to our Windows 2003 Print Cluster.  The desktops that are remotely executing the commands are Windows XP Professional SP2 systems.

Command to add/update a printer port (our ports are typically the same as the ip)
cscript c:\windows\system32\prnport.vbs -a -s \\servername -r 10.10.10.200 -h 10.10.10.200

Command to point an existing print queue to that newly added port
cscript c:\windows\system32\prncnfg.vbs -t -s \\servername -p queuename -r 10.10.10.200

Error received (only when performing prncnfg.vbs command on the Windows 2003 Print Cluster)
Unable to get configuration for printer queuename Error 0x80041002 Not found
Operation GetObject
Provider CIMWin32
Description
Win32 error code

I found one other post here on Experts Exchange which had a posted solution, however; in this case I'm not using AD to publish, create, or access printers.  I've also attempted using the -u (username) and -w (password) flags with these commands and inserted the username and password for the Cluster Service, however; that didn't work either.

All help is appreciated!

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of snagsy1980snagsy1980🇬🇧

you must have administritive permissions on the printer cluster to make these changes

Avatar of snagsy1980snagsy1980🇬🇧

also i'm presuming you have read this article? it's very good for syntax and parameters http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/prncnfg.mspx?mfr=true

Avatar of FedexAdminFedexAdmin

ASKER

The account used explicitly (by entering the -u and -w flags) as well as my logged in account on my XP Professional workstation both are domain administrators and are a part of the local administrators group on that remote server.  Are you speaking of a different place other than "Users and Groups"?

Also, I have read that article and the syntax of the commands are correct and working on the non clustered servers.  It is as if the changes are not "sticking" on the 2003 Print Cluster.  I even tried to execute the above commands against the individual servers in the cluster and that failed as well.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of snagsy1980snagsy1980🇬🇧

have you tried raising the ad functionality? or is it already 2003 native? i know with older functionality the print cluster does not respond well to commands

Yes, our Active Directory environment is 2003 native.  Thanks for the quick responses by the way.  I'm willing to answer any questions anyone may have to find a quick solution.  

Thanks again!

Avatar of snagsy1980snagsy1980🇬🇧

have you read this article? http://support.microsoft.com/kb/302539

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


No I haven't read that article.  This is probably due to the fact that I am not suspecting corrupt drivers, however; within the article you posted, I did find a link to yet another article on how to create the Print Cluster Server http://support.microsoft.com/kb/278455/EN-US/.  Within that article is a reference to the key that stores the printer queues and ports in the cluster:

HKLM\Cluster\Resources\%Spooler GUID%\Parameters\Monitors

This may assist me in a work around via the registry if need be, however; I'd really like to be able to configure the print queues via prncnfg.vbs if at all possible.

Avatar of snagsy1980snagsy1980🇬🇧

i think i've got it, the queuename should be defined with -q queuename -r 10.10.10.200 not cscript c:\windows\system32\prncnfg.vbs -t -s \\servername -p queuename -r 10.10.10.200 you have used -p which is printername and not -q which is queue name

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


-q is not a valid option for prncnfg.vbs...I tried to use it even though it's not in the syntax list however it just gave me the command syntax message.

Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Usage: prncnfg [-gtx?] [-s server][-p printer][-z new printer name]
               [-u user name][-w password][-r port name][-l location]
               [-m comment][-h share name][-f sep file][-y datatype]
               [-st start time][-ut until time][-i default priority]
               [-o priority][<+|->shared][<+|->direct][<+|->hidden]
               [<+|->published][<+|->rawonly][<+|->queued][<+|->enablebidi]
               [<+|->keepprintedjobs][<+|->workoffline][<+|->enabledevq]
               [<+|->docompletefirst]

Arguments:
-f     - separator file name
-g     - get configuration
-h     - share name
-i     - default priority
-l     - location string
-m     - comment string
-o     - priority
-p     - printer name
-r     - port name
-s     - server name
-st    - start time
-t     - set configuration
-u     - user name
-ut    - until time
-w     - password
-x     - change printer name
-y     - data type string
-z     - new printer name

-?     - display command usage
Examples:
prncnfg -g -s server -p printer
prncnfg -x -s server -p printer -z "new printer"
prncnfg -t -p printer -l "Building A/Floor 100/Office 1" -m "Color Printer"
prncnfg -t -p printer -h "Share" +shared -direct
prncnfg -t -p printer +rawonly +keepprintedjobs
prncnfg -t -p printer -st 2300 -ut 0215 -o 1 -i 5

Avatar of snagsy1980snagsy1980🇬🇧

you are using the prncnfg command which allows you to view or configure the properties of a printer with this command only the -o switch is relevant as it lets you prioritise the spooler queue priority ,

Try using prnport to specify the queuename first

Prnport -a -r PortName [-s ComputerName] [-u UserName -w Password] -h IPAddress
[-o {raw -n PortNumber | lpr}] [-q QueueName] [-m{e | d}] [-i IndexName] [-y
CommunityName] [-2{e | d}]

this is a great ebook that i have, you can keep it lol excuse the profanity in the url it's not my doing :-) http://ot.talkin-shit.net/ebooks/Microsoft/Scripting/How%20to%20Cheat%20at%20Windows%20System%20Administration%20Using%20Command%20Line%20Scripts.pdf

I do add the port using the prnport.vbs command first.  It even shows up when I list all printers on the server, however; it won't let me point to that port using the prncnfg.vbs command.  (see below)

C:\>cscript c:\windows\system32\prnport.vbs -s \\printcluster01 -l
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Server name printcluster01
Port name 10.10.10.200
Host address 10.10.10.200
Protocol RAW
Port number 9100
SNMP Enabled
Community public
Device index 1

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of snagsy1980snagsy1980🇬🇧

Will you show me the output you get when you use this command? cscript prnmngr.vbs-l [-sRemoteComputer] [-uUserName-wPassword]


C:\>cscript c:\windows\system32\prnmngr.vbs -s phprintclus02 -u myuser -w mypass -l
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Number of printers enumerated 0

ASKER CERTIFIED SOLUTION
Avatar of FedexAdminFedexAdmin

ASKER

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account
Windows Server 2003

Windows Server 2003

--

Questions

--

Followers

Top Experts

Windows Server 2003 was based on Windows XP and was released in four editions: Web, Standard, Enterprise and Datacenter. It also had derivative versions for clusters, storage and Microsoft’s Small Business Server. Important upgrades included integrating Internet Information Services (IIS), improvements to Active Directory (AD) and Group Policy (GP), and the migration to Automated System Recovery (ASR).