How to perform get text in cmd

If ipconfig is the input how to extract the result (get text)

Ipconfig > c:\temp\textfile.txt

Read above text file to variable

Thanks Bro,
But i have to do similar type of transaction for 1k data. saving in a file and reading wont help interms of time and memory