web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Corrupt CSV file when ...
Power Automate
Unanswered

Corrupt CSV file when run from Powershell on PAD

(0) ShareShare
ReportReport
Posted on by 19

This was working until yesterday. I have a flow using PAD version 2.33.96.23172.

The flow does the following: Get Special Folder (Desktop), Set Variable (FileName), Run Powershell script and Send Email (SMTP).

 

If I copy the PS script from the flow and run it manually in PS it runs fine, CSV file is not corrupt.

I tried running without sending email, still corrupt.

I deleted the flow and created a new one from scratch, same problem.

This was working since last week with no troubles. I have not changed anything. I also tried running from another machine, same problem.

 

Anyone else having this problem?

 

Denise

 

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Can you share the script? 

     

  • dchild Profile Picture
    19 on at

    I just confirmed it is when using -Encoding UTF8 in PAD. I am using MgGraph to get Users and export to CSV.

    It is strange that it was working and it stopped, but I just read where this is not supported?

    https://ideas.powerautomate.com/d365community/idea/8cd2b2f0-ba53-4026-a548-4102de534ae3

     

    I did confirm by using a different PS script in PAD that does not use Encoding and it does work.

     

  • dchild Profile Picture
    19 on at

    To get around the limitation of running a Powershell script that will not support Encoding UTF8 when exporting a CSV file in PAD, I am running a Dos Command, I just create a CMD file with the following:

    start pwsh.exe .\FileName.ps1

     

    Denise

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 274 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 175

#3
Haque Profile Picture

Haque 166

Last 30 days Overall leaderboard