I have been trying to get this powershell snippit working in UiPath and can’t seem to. It is giving the following error below. If I copy that directly from below and paste it in the PS console, it works perfectly. This is the snippit of code I use in the commandText:
"Get-Process | Where-Object {$_.ProcessName -eq " + Chr(34) + ProcessName + Chr(34) + “} | Stop-Process -Force -ErrorAction SilentlyContinue”
Kill Process: The term ‘Get-Process | Where-Object {$_.ProcessName -eq “chrome”} | Stop-Process -Force -ErrorAction SilentlyContinue’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
What am I doing wrong here? I also have a screenshot below of the entire thing. Thanks