Hi,I am new to VBScript, I am trying to get all the printers status on a network. Is there a script to do that? thank youRead more
0
0
1 User
1 UserPlease briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
here is the code if you need to check if a printer is connected to nework: Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Printer WHERE Name = 'HP DeskJet 2720E'") For Each objItem in colItems If objItem.Network = True Then WScripRead more
here is the code if you need to check if a printer is connected to nework:
[crayon-6765388c61038535139484/]
This script uses the Windows Management Instrumentation (WMI) service to query for printers with the name “HP DeskJet”. It then checks the value of the
Network
property for each printer to determine whether it is connected to the network. If theNetwork
property isTrue
, the script outputs a message indicating that the printer is connected to the network. If theNetwork
property isFalse
, the script outputs a message indicating that the printer is not connected to the network.I hope this helps!
See less