Please see this thread for reference
How can I scan using nmap and Zenmap all hostnames that begin with a particular string?
One of the answers in the thread above uses the following query (I take no credit at all for the command):
nmap -sL -oG - 192.168.0.0/24 | awk '$3~/^(org/{print $2}' | nmap -iL -`
It scans all nodes for hostnames starting with org and returns a list of matching nodes.
It works great in a Unix/Linux environment, but I need an equivalent for Windows. I'd prefer not to use awk, sed, or grep packages for Windows. I'd like to maintain a standard and use PowerShell and/or Perl.
Is there an equivalent way to construct this query using PowerShell and/or Perl, along with nmap?