I'm using powershell curl commands to make REST API Calls. When I run the curl command with -c option,
curl https://sampleurl/api/sessions -i -X POST -H X-Api-Version:x.x -c mycookie -d email=$email -d password=$passwd
-c option saves (all known) cookies into the given file name. The file name is in your current directory, or if you use a path too, relative to the current directory.
You can of course also specify a full absolute path name to specify exactly where you want that cookie file to be saved.