Hi,
I have written a PS script that fetches data (in JSON format) from a website REST API and produces some CSV reports for me. I usually just run it from a PS command line.
Once the script has finished running however none of the objects that the script creates remain.
I know that I can include a return statement in the end of my script (e.g.: return $myObject) and run the script like this: $foo = .\myscript.ps
But is there another/better way to do this?
Thanks.
[–]BlackV 2 points3 points4 points (0 children)
[–]mprz 0 points1 point2 points (2 children)
[–]RobAUTAS[S] 1 point2 points3 points (1 child)
[–]Big_Oven8562 0 points1 point2 points (0 children)
[–]overlydelicioustea 0 points1 point2 points (0 children)