I have SNMP turned off on my network, so I do not need to specify a community string or any of that stuff. Here are the optional parameters for this parameter set:Īdd-PrinterPort [-AsJob The Add-PrinterPort function has four parameter sets, and I use the third one to create a TCP printer port. I do not need to specify a value for the port number unless the printer is configured to use a different value than the default. Here is the command I used:Īdd-PrinterPort -Name ‘HP_Direct:’ -PrinterHostAddress ‘192.168.1.88’ The IP address of the printer itself becomes the value for the PrinterHostAddress parameter. I use the Add-PrinterPort function, create a name for the port (the name does not matter, but it is best to use something that makes sense in the printing context). Also by printing directly to the printer, I can configure things the way that I want.īy using Windows PowerShell, it is easy to create a TCP printer port. Therefore, in the case of large print jobs, I lose flexibility because my laptop must remain on to manage the large print job. Most of the time, if I am creating a local printer port, I want to print directly to a printer on the network. By using the Add-PrinterPort function, I can add a local printer port, a TCP printer port, or an LPR printer port. To add a new printer port, I use the Add-PrinterPort function in Windows 8 or Windows Server 2012. The commands and the output from the commands are shown in the following image. I can also use this function to retrieve printer port information from a remote server running Windows Server 2008 and Windows PowerShell 3.0 as shown here: I can use the Get-PrinterPort function to list existing printer ports on my local computer: Using PowerShell to work with printer portsīefore I create anything, I like to know what I have going on with my computer. Today I am talking about creating the printer port. Install the printer (by using the printer port and the printer driver).To programmatically create a working printer, there are at least three steps: If you do not know what Windows PowerShell is, check out my blog post, Community: All about PowerShell Saturday. For information about these and other events, check out my site, Scripting Community. We have new events coming up in Atlanta, Singapore, and Charlotte. One of the exciting things that is happening around the Scripting House is the appearance of new Windows PowerShell Saturday events. Microsoft Scripting Guy, Ed Wilson, is here. Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell 3.0 to create new printer ports in Windows 8.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |