Once you create and share a printer, as shown in the previous recipe, you can additionally publish it to the Active Directory. When you publish a printer, you can also specify a location for the printer that enables your users to search for published printers based on location and capabilities. End users can search AD to find printers and to find the printers near to them. In this recipe, you publish the printer you created in the previous recipe and examine the results.
In this recipe, you publish the printer that you created in the preceding recipe, Installing and sharing printers.
- Get the printer to publish and store the returned object in
$Printer
:
$Printer = Get-Printer -Name SGCP1
- Observe the publication status:
$Printer | Format-Table -Property Name, Published
- Publish the printer to AD:
$Printer | Set-Printer -Published $true ` -Location '10th floor 10E4'
- View the updated publication status:
Get-Printer -Name SGCP1 |...