title: wmic on remote computer, taken form list of computer name or ip
body: <pre><code>@echo off
  wmic /node:"computer" /user:myusername /password:"password" product get name &gt; log.txt
  </code></pre>
  
  <p>how do i get ip's form a file and input it in node? </p>
  
  <pre><code>127.0.0.1 
  more ips here ...
  </code></pre>
  
  <p>ip.txt^</p>
  
  <p>username and password is the same for all the pc's im trying to reach.</p>
  
  <p>i understand how the batch file can read form file, but i dont understand how to input it in the node.</p>
  
  <pre><code>for /f "tokens=*" %%a in (ip.txt) do (
  echo line=%%a )
  </code></pre>
  
  <p>might be a stupid question but,</p>
  
  <pre><code>     for /f "tokens=*" %%a in (ip.txt) do (
            )
       wmic /node:%%a /user:myusername /password:"password" product get name &gt; log.txt
  </code></pre>
  
  <p>just leave a comment if i formulated the question wrong.</p>
  
  <p>ps: deleted old one</p>
  
  <p>edit:</p>
  
  <pre><code>         for /f "tokens=*" %%a in (ip.txt) do (
  
           wmic /node:%%a /user:myusername /password:"password" product get name &gt; log.txt
  )
  </code></pre>
  
  <p>like this ^ ?</p>
  
  <p>edit edit: if i want to get more info from this command like graphics card, ram and sutch.</p>
  
  <pre><code>wmic /FAILFAST:ON /node:@ip.txt /user:username /password:password path Win32_VideoController get Name &gt;&gt; log.txt
  </code></pre>
  
  <p>to get the graphics card info, do i need an other line and change the get command or can i get a lot of info in one line ?</p>
  
  <p>mabye like </p>
  
  <pre><code>wmic /FAILFAST:ON /node:@ip.txt /user:username /password:password path Win32_VideoController get Name,product get name, MEMORYCHIP get BankLabel,DeviceLocator,Capacity,Tag &gt;&gt; log.txt
  </code></pre>
  
  <p>if that makes sense </p>