CmdID

CmdID / Commands

pubprn

Publishes a printer to the Active Directory Domain Services. Windows commands reference

On Windows

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from the Windows commands reference, CC BY 4.0

Publishes a printer to the Active Directory Domain Services. This command is a Visual Basic script located in the %WINdir%\System32\printing_Admin_Scripts\<language> directory. To use this command at a command prompt, type cscript followed by the full path to the pubprn file, or change directories to the appropriate folder. For example: cscript %WINdir%\System32\printing_Admin_Scripts\en-US\pubprn.

cscript pubprn {<servername> | <UNCprinterpath>} LDAP://CN=<container>,DC=<container>
cscript pubprn Server1 LDAP://CN=MyContainer,DC=MyDomain,DC=company,DC=Com
cscript pubprn \\Server1\Laserprinter1 LDAP://CN=MyContainer,DC=MyDomain,DC=company,DC=Com
<servername>Specifies the name of the Windows server that hosts the printer that you want to publish. If you don't specify a computer, the local computer is used.
<UNCprinterpath>The Universal Naming Convention (UNC) path to the shared printer that you want to publish.
LDAP://CN=<Container>,DC=<Container>Specifies the path to the container in Active Directory Domain Services where you want to publish the printer.
/?Displays help at the command prompt.