Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Export-csv to current User's desktop

$
0
0

How can I export a csv file to the current user's desktop? Several users will be running a command that will export a csv file, and I would like it to export it to each of their desktops when they run the command. And can i put a variable as part of the filename? For example, this doesn't work and I'm not sure if you can do anything like this:

$group = "group1"

export-csv %username%\desktop\$group.csv

Help.

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>