Use |
vertical line to pipe the ipconfig
output into findstr
command as follows:
ipconfig /displaydns | findstr /C:"Record Name" /C:"A (Host) Record" /C:"----"
Use >
greater than sign to redirect all output to a text file named e.g. ipc.txt
(note parentheses!):
> ipc.txt (ipconfig /displaydns | findstr /C:"Record Name" /C:"A (Host) Record" /C:"----")