Code does as follows.
./curl.exe --insecure --http1.1 --tlsv1.2 --url "https://$IP/cgi-bin/NAXML?cmd=vposjournal&period=2&filename=$URL&cookie=$cookie2" | out-file "C:\sdirectory\SAVEDFILE.xml"
However, this XML file (A valid XML) is not readable in browsers.
Is out-file the best way to export this to disk? Is there a more viable alternative?