Atvik
Apr 29, 2 PM - Apr 30, 7 PM
Taktu þátt í fullkomnum sýndarviðburði Windows Server 29.-30. apríl fyrir djúpa tæknifundi og spurningar og svör í beinni með verkfræðingum Microsoft.
Skráðu þig núnaÞessi vafri er ekki lengur studdur.
Uppfærðu í Microsoft Edge til að nýta þér nýjustu eiginleika, öryggisuppfærslur og tæknilega aðstoð.
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>
Parameter | Description |
---|---|
<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. |
To publish all printers on the \Server1 computer to the MyContainer container in the MyDomain.company.com domain, type:
cscript pubprn Server1 LDAP://CN=MyContainer,DC=MyDomain,DC=company,DC=Com
To publish the Laserprinter1 printer on the \\Server1 server to the MyContainer container in the MyDomain.company.com domain, type:
cscript pubprn \\Server1\Laserprinter1 LDAP://CN=MyContainer,DC=MyDomain,DC=company,DC=Com
Atvik
Apr 29, 2 PM - Apr 30, 7 PM
Taktu þátt í fullkomnum sýndarviðburði Windows Server 29.-30. apríl fyrir djúpa tæknifundi og spurningar og svör í beinni með verkfræðingum Microsoft.
Skráðu þig núna