Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get list of all print servers in the domain in C#

I'm working in a large environment writing a utility for a tech support team. I need to provide a list of all the print servers in the domain and let them pick one. Once they pick a print server, I will list all the print queues on that print server and have them select one. I have found plenty of examples of how to pull the list of print queues from the print server, but no examples of how to get a list of print servers.

How can I get a list of all the print servers in a domain (C#)?

like image 215
ScottK Avatar asked Nov 13 '22 03:11

ScottK


1 Answers

You can use the System.Management Namespace.

Please refer to this thread:
Is there a .NET way to enumerate all available network printers?

like image 160
ems305 Avatar answered Dec 25 '22 22:12

ems305