I’m trying to do something similar. The following post Calling ipconfig the person was able to redirect the output to a file for reading. He said that using the /C switch is key. I don’t know if that is the answer for this post, but it could help someone.
Also wmic with /output is working for me too. Thanks for this.