上QQ阅读APP看书,第一时间看更新
How to do it...
- 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 | Format-Table -Property Name, Published, Location