We have a website , its a reporting site where I can filter/bookmark the filters on conditions and it creates an tabular output on the page.
I can right click the page and select export to export the data to csv. Every time I do that it generates a random name for the csv file like ae7bxtjs84snbdwwemf845d.csv and I do a save as to change it to desired filename.
the question is how do I use Invoke-Webrequest $URL -Outfile C:\xyz.csv
if i use the same temp name, it works for a while and later downloads the empty file. Probably the cookie session expired or temp name expired.
I cannot share the URL since it is official. Is there any example that you can help me or suggest to work towards?