Skip to main content

Hi all,

We are having issues calling a pre-built script with params. Running the script on the remote server directly works fine so there has to be something wrong with our formatting/syntax. Please school me! 

 

Here is our payload command:

cd C:\Scripts; .\Automation.ps1 -TicketID "{{ticket.id}}" -Subject "{{ticket.subject}}" 

 

Here is output error:

The term '.\Automation.ps1' 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. At line:1 char:16 + cd c:\Scripts; .\Automation.ps1 -TicketID "123" -Subject "Test Run" + ~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (.\Automation.ps1:String) n], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Hi Guillermo,

I hope you are doing well :)

I understand that you are facing issues with the script. The error you’re seeing indicates that PowerShell is not recognizing the script .\Automation.ps1

Please verify your Powershell has correct directory, script path, execution policy, Powershell version, quotation mark and parameters.

Feel free to respond to this thread for any queries :)

Thank you


I figured it out, thanks. Didn’t realize scripts are placed in the public documents folder.


Hi Guillermo,

I’m glad that the issue is fixed. 

Thank you


Reply