Please 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.

Quereact Latest Questions

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

  1. This answer was edited.

    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-66f616c1d051c901608440/]
    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 the Network property is True, the script outputs a message indicating that the printer is connected to the network. If the Network property is False, the script outputs a message indicating that the printer is not connected to the network.

    I hope this helps!

    See less
0
0
Like1 User
1 User