Reading a text file through Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2016 11:42 AM
Hello,
I want to read a text file on Windows computer through Discovery, for this I have created a probe and created a probe parameter in that probe mentioning the location of the file and started testing it. But I am receiving below error message
"Powershell: Unable to find script(s) specified in parameters. Make sure the script(s) associated with probe are passed down properly."
I have created everything taking content in the below link:
http://wiki.servicenow.com/index.php?title=Custom_Probe_-_Text_File#gsc.tab=0
Please help me to resolve this.
Thanks!
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2017 04:09 PM
Hi Nikitha,
The instructions in the link you provided (http://wiki.servicenow.com/index.php?title=Custom_Probe_-_Text_File#gsc.tab=0) has you create a .js file with WMI code for reading the file. (I am not sure that WMI code is the right term).
Starting with the Fuji release, MID servers expect WMIRunner probes to use Powershell, so the MID server is looking for a .ps1 file. (Because the probe does not contain a parameter with the .ps1 extension, you get the error: Powershell: Unable to find script(s) specified in parameters. Make sure the script(s) associated with probe are passed down properly.
You have a couple options to address the problem.
- You can rewrite the probe script as a powershell script and create a .ps1 parameter.
- You can force your mid server to use WMI instead of Powershell for running WMIRunner probes.
You do this by adding the mid.use_powershell parameter to your MID server and setting the value to false.
(If you set the the mid.use_powershell parameter to false, all of your WMIRunner probes will use WMI rather than Powershell.)
Note: An example of a probe in the Helsinki release that has both Powershell and WMI scripts as parameters is the Windows - Get APD Env File Content probe. When this probe runs, the MID server will use the .ps1 script is the MID server parameter mid.use_powershell = true. The MID server will use the .js script if mid.use_powershell = false.
I hope that this helps.
Best Cody