Search by substring and extract string

Home Forums Scripting PowerShell Search by substring and extract string

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    ckiani7
    Member
    #167535

    I am trying to extract a string from a text file by matching with a substring.

    I cannot get my script to extract the whole line (String) when it finds the particular substring, all it does is output the substring found. Has anyone got any ideas on how this can be done.

    The text file is huge and is a list of dns queries all I want is the string with a particular hostname and IP address and then output this to another text file.

    Thanks in advance. :bowdown:

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.