Home Service Manager

Service Manager Console Task - The system cannot find the file specified

Philip_HåkansPhilip_Håkans Customer IT Monkey ✭

Hello!

I'm having major issues with getting a basic console task to work.


I cannot find any documentation on console tasks online no matter what I search for but perhaps my Google Fu just isn't strong enough.

Basically, I have a PowerShell script that returns a bunch of computer information which I would like to be logged as a comment in an Incident Record. However no matter what I do the above error occurs. I've checked that the files are in the exact path on the server where SCSM is installed, even tried running it from a client with the files needed in the exact same spot as well but nothing works. It just cannot find the filed specified.

Does anyone know how to solve this?

This is what it looks like in the configuration:


Answers

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited June 8

    Close.

    What I've done here is set the full path to just call PowerShell. The Body of the Task is the parameters for calling the PowerShell script. Given this, instead of hardcoding a parameter you could pass in a Propertry from an Incident object you've selected in the console.


    My "Get-Stuff.ps1" script is as follows. A param block followed by a single action.


    The "Log in action log" and "Show output" I just had checked off while I was quickly throwing this together. They are not required.

    But in order to write the result of the PowerShell into the Comment you just need to place some kind of final variable/output as the result. In the above Get-Stuff.ps1 example, if the pipeline was removed and all that remained was $IncidentID on line 6. Then the value of $IncidentID would be written as the Comment to the selected Incident's Action Log.


Sign In or Register to comment.