title: how to use select-string to get value of particular string from txt file
body: <p>How do I get a specific string from txt file using <code>select-string</code> for example, what I tried so far is:</p>
  
  <pre><code>$path = "\\serverpath\servername.txt"
  $list = select-string -path $path -pattern "node"
  write-host $list
  </code></pre>
  
  <hr>
  
  <p><code>servername.txt</code> contains:</p>
  
  <pre><code>servername is node1 and it is development server, it has problem
  servername is node2 and it is production server, it is good
  </code></pre>
  
  <p>So I need to list only the words <code>node1</code>, <code>node2</code> ...from the <code>.txt</code> file.</p>