Run javascript .js file using power shell activity

Hi Folks,

Does anyone knows how to run .js file using invoke powershell activity as i’m trying it by passing file name but getting an error “Invoke Power Shell: The term ‘console.log(“Hello from JavaScript via UiPath!”);’ is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.” Please help me to done this.

in my .js file i have written “console.log(“Hello from JavaScript via UiPath!”);”

@Sagar_Prakash_Choudhari

may I knwo why you want to run from powershell when you have invoke js?

also to run js you need a ide like node.js or browser dev tools etc…I am not sure if you have the setup…if you have it then there are node coommands that you cna use to run js from terminal

cheers

i have checked and find inject js activity only. so are you talking about inject js or any other activity. i have installed node.js setup but not sure about the exact activity name to run js file

when running/calling/executing a Javascript script in Powershell, there will be an overall goal to get motivated for this. So let us know what finally is aimed to get done. Thanks for your support.

@Sagar_Prakash_Choudhari

yes inject js is what I am talking about which can run on the browser which ever is attached

cheers