Try activating “IsScript”. The reason is that native PowerShell commands are slightly different from ordinary executables and can take strongly typed, named input arguments that you can supply in the Parameters dictionary. The actual command in this case is solely the command name, e.g. “Get-Process”. The script setting causes the command string to be run as-is, instead of being interpreted as mentioned.
Sorry. I had just solved my own confusion over this in a workflow and saw this topic. In fact I ended up combining several commands in a powershell script file and using the Powershell Script activity. It’s also possible to define parameters that your script will receive from the workflow, another neat trick I didn’t know about.
Can anyone please provide sample workflow. I am facing “specified file not found error”, I am trying to open a word document through powershell using Ui path.
What did you try that does not work? As far as I know it should be sufficient to enter the document path (as a string) inside the Invoke Power Shell activity, e.g. "C:\Path\To\document.docx", and it will open with the default application for the file type.