title: Powershell 5 Get-content command to select specific word from text file with select-string command I get entire line
body: <p>Powershell 5 Get-content command to select specific word from text file with select-string command I get entire line.</p>
  
  <p>e.g I am running below command and looking to select only specific word, but output gives entire line in which test1 word exists. </p>
  
  <p>PS C:> Get-Content C:\temp\testfile.txt | Select-String test1</p>
  
  <p>hostname is test1, buildhistory 3 hours</p>
  
  <p>and I am looking for command which willl only write <strong>test1</strong> in output</p>