- PowerShell V3.0에서는 Printer에 대한 cmdlet가 추가되어 있다. Get-Command *-Printer를 해 보면 알 수 있다. PowerShell로 Printer를 관리한다면, 관리자가 원격 컴퓨터에 접속하여 프린터를 설치할 수 있는 장점이 있다
- 로컬 컴퓨터에 설치된 프린터를 보려면
Get-Printer
Get-Printer -Name “HP LaserJet 400 M401 PCL 6”
Get-Printer -Name “HP LaserJet 400 M401 PCL 6” | Format-List *
(이렇게 보면 “공유 여부”와 “공유 이름” 및 “Active Directory에 게시(Published) 여부”도 알 수 있다) - [원격 컴퓨터]에 설치된 프린터를 보려면
Get-Printer -ComputerName Server1
Get-Printer -ComputerName Server1 | fl * - Active Directory에 게시된 Printer를 보려면…
Get-Printer -ComputerName DC1 | Where-Object {$_.Published}
** 이렇게 확인을 했으면 프린터 추가 마법사를 통하여 프린터를 설치하면 된다 - 공유된 프린터를 로컬 컴퓨터에 설치하기
Get-Printer -ComputerName Server1 | fl *
Get-Printer -ComputerName Server1 | Select-Object -Property ShareName
Add-Printer -ConnectionName \\Server1\Sharedname - 원격 컴퓨터에 접속하여 로컬 프린터 설치하기
Enter-PSSession -ComputerName pc1
Add-Printer -ConnectionName \\Server1\Sharedname