The pubprn command and the pushprinterconnections command in Windows
(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012)
The pubprn command in Windows
(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012)
The pubprn command helps publish a printer to the Domain Services directory.
The syntax pubprn command
cscript pubprn {| }
"LDAP: // CN =, DC ="
Parameters pubprn command
Parameters
Describe
Specify the name of the remote computer that the printer stores you want to publish.If you do not specify a remote computer, the local computer will be used by default.
Universal Naming Convention (UNC) path for shared printer you want to publish.
"LDAP: // CN =, DC ="
Specify the path to the Domain Services folder where you want to publish the printer.
/?
Show help at thecommand prompt.
Pubprn command comment
The pubprn command is a Visual Basic script located in the % WINdir% System32printing_Admin_Scripts directory . To use this command, at the command prompt, type cscript followed by the full path to the pubprn file, or change the directory to the appropriate directory.
For example:
cscript% WINdir% System32printing_Admin_Scriptsen-USpubprn
If the information you provide contains spaces, use quotation marks for the text (for example, "computer Name").
For example, pubprn command
To publish all printers on the computer named Server1 to the folder that contains the name MyContainer in the MyDomain.company.Com domain, enter:
cscript Ppubprn Server1 "LDAP: // CN = MyContainer, DC = MyDomain, DC = company, DC = Com"
To export a print release named Laserprinter1 on Server1 to the directory containing MyContainer in the MyDomain.company.Com domain, enter:
cscript Ppubprn Server1Laserprinter1 "LDAP: // CN = MyContainer, DC = MyDomain, DC = company, DC = Com"
The pushprinterconnections command in Windows
The pushprinterconnections command helps you read the printer connection settings that you have deployed from Group Policy, and deploy or remove printer connections if needed.
Syntax command pushprinterconnections
pushprinterconnections <-?>
Command parameter pushprinterconnections
Parameters
Describe
Write a debug file for each user to % temp or debug log for each machine in % windir% temp.
<-?>
Show help at thecommand prompt.
Comment the pushprinterconnections command
This utility is for use in startup machines or user login scripts.Do not run in the command line (command line).
See more:
- Prnport command in Windows
- Prnmngr command in Windows
- The prnjobs command in Windows
- Prndrvr command in Windows
You should read it
- Del command in Windows
- Set command in Windows
- Rem command in Windows
- Cmd command in Windows
- Command at in Windows
- Fc command in Windows
- The echo command in Windows
- Reg command copy in Windows
- The command reg add in Windows
- Bitsadmin getdisplayname and bitsadmin geterror command in Windows
- Doskey command in Windows
- Exit command in Windows
Maybe you are interested
Things to know about sunscreen How to use Photoshop CS5 - Part 15: Remove wrinkles with the Healing Brush tool The list of foods that contain the most iron is easy to find There was a year when the Earth had no summer and the world history was changed 10 types of food enhance men's vitality Surgery can permanently change your eye color to blue