IT Automation. PowerShell. Read Text Files
This sample gets all the text files from the folder and displays their contain using PowerShell commands.
Steps to automate
- In case there isn't a text document in the folder, the workflow creates one.
- Get all the text documents from the folder.
- For each one, extracts their content and displays it.
- Use "Write text file" activity to create a text document. If you have text files in folder you can skip this part.
- Using "Invoke PowerShell" activity, you can send commands from your workflow to Windows PowerShell.
- Display the content of each text document using a "For Each" and a "Message Box" activity.