I am trying to write a script that will export a CSV (or any output really) to a variable path destination that any one can use to put the output to the relative same location – like their desktop.
For example as a BAT script I would use %USERPROFILE%DesktopMyFile.csv to output the results to the desktop of the user who runs it. My script works fine when I export to a static location (like MyServerShareMyFile.csv or C:UsersMeDesktopMyFile.csv) but nothing appears if I do that in PS nothing happens and I am not finding an answer through Google.
Thanks in advance!
submitted by /u/TeddyDaBear
[link] [comments]
The post Export-CSV to Path Variable? appeared first on How to Code .NET.