title: Accessing cmd prompt in remote machine using vbscript
body: <p>How to access Command Prompt in remote machine using VBScript?
  We are in process of creating a tool to fetch component services and its status on remote machines.
  Currently we are able to achieve this in our local machine by using the below code:</p>
  
  <pre><code>Dim objShell : Set objShell = CreateObject("WScript.Shell")
  Set getvalue=objShell.Exec("cmd.exe /C sc queryex type= service state= all")
  Do
      output = getvalue.StdOut.ReadLine
      MsgBox output
  Loop While getvalue.StdOut.AtEndOfStream = False 
  </code></pre>
  
  <p>But we need to achieve the same in remote machine.</p>