Powershell: Print server details

Scenario: I was performing some maintenance on one of the print servers where I currently work, we needed to take the server down for a period of time.

The help desk wanted to send an email to the users telling them that the users of PrintServer1 would not be able to print during this period.

Would you know which print server your printer is attached to ? Would the users ?

Answer: With the following powershell one liner we were able to tell the users which printers would be unavailable for that period of time:

PrintServer1″ | ForEach-Object{get-wmiobjectcomputername $_ Win32_Printer | select-object Caption, Location} | Export-Csv “C:\PrintServer1.csv

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.