Sunday, March 2, 2014

PowerShell: Get Printer Information

By: Joe Piggee

$PrintServer=Read-host "Enter the Print Server Name"

$SavePath="c:\temp\$PrintServer.csv"

Get-WMIObject -class Win32_Printer -computer $printserver | Select Name,DriverName,PortName | Export-CSV -path $savepath

Write-Host "File saved to:" $SavePath

No comments:

Post a Comment