title: Monitor serial number is not returned vb.net
body: <p>I am using the vb.net code bellow to try to get the monitor serial number of any computer on the network. The code works well for a local computer but I got 0 as result for remote computers. However, with the same logic of the code, I can get other values on remote computers like the ManufacturerName by instead. I ran a WMI Code Creator and I also got 0 as result for a remote computer. Using a vbscript I could get the right serial number, so I know the result from the vb code is wrong. I would appreciate any help.</p>
  
  <pre><code> Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
      Dim objWMIService, colItems As Object
      Dim strComputer As String, serialNum As String, instanceName As String
      strComputer = "TDS57771-CCU"
  
      objWMIService = GetObject("winmgmts:" &amp; "{impersonationLevel=impersonate}!\\" &amp; strComputer &amp; "\root\wmi")
  
      colItems = objWMIService.ExecQuery("SELECT * FROM WMIMonitorID")
  
      For Each objItems In colItems
          serialNum = ""
          If objItems.SerialNumberID Is Nothing Then
              MsgBox("XXX")
          Else
              'arrSerialNumberID = objItems.SerialNumberID()
              For Each arrValue As UInt16 In objItems.SerialNumberID
                  serialNum = serialNum &amp; Chr(arrValue)
  
              Next
  
          End If
          MsgBox(serialNum)
      Next
  End Sub
  </code></pre>