Invoke PowerShell code in UiPath


Could someone help me, I need to retrieve all the users from Windows Active Directory using a PowerShell code so that the exported file keeps being updated but it exports it as .csv .But the robot needs to read the file but because it’s a .csv the robot can’t read the file.

And I keep getting this error.

Could someone help me?

With kind regards,


Hi @ukjtenhoven

Check the file manually is the path right



Please check your CSV file format.

You can refer below article

Hi @ukjtenhoven
Try to change the path manually and also change the file format to other format, i mean excel etc… and then try, may be it will work.



Yea I checked that already