All Apps and Add-ons

powershell install on splunk6.1

jacklai8169
Explorer

DEAR ALL:
After I install "SA-ModularInput-PowerShell",it will show this error message

Unable to initialize modular input "powershell2" defined inside the app "SA-ModularInput-PowerShell": Unable to locate suitable script for introspection.

Can anyone help me to solve this probmel!!

jbennett_splunk
Splunk Employee
Splunk Employee

All that this means is that PowerShell2 won't work (probably because you don't have the OLD .Net 3.5 installed). The newer version will work if "PowerShell" isn't giving you the same error.

See FAQ: http://docs.splunk.com/Documentation/AddOns/latest/MSPowerShell/FAQ#Unable_to_initialize_modular_inp...

0 Karma

Akili
Path Finder

ERROR ModularInputs - Unable to initialize modular input "powershell2" defined inside the app "SA-ModularInput-PowerShell": Unable to locate suitable script for introspection.

how to fix this?

0 Karma

Akili
Path Finder

yep its ok now. ive fixed it.

0 Karma

jbennett_splunk
Splunk Employee
Splunk Employee

Did you read what I wrote above? What OS is your server? Does it have .Net 3.5 installed? Can you run:
PowerShell.exe -version 2.0

0 Karma

jbennett_splunk
Splunk Employee
Splunk Employee

You don't need to worry about this. Basically, there are two modular inputs, "PowerShell" for all the latest versions of PowerShell, and "PowerShell2" for the older PowerShell 2. If you only see this message for PowerShell2, then it just means you don't have the old version available.

See the FAQ

On a Server 2012R2, by default only the current version of .Net is installed, and only CLR 4 is available, not CLR 2.

Thus, by default you can have [PowerShell:...] stanzas which will run the latest PowerShell installed, nut you cannot have [PowerShell2:...] stanzas which run the older PowerShell version 2, because that requires CLR 2 (i.e.: .Net 3.5 SP1).

If, for some reason, you wanted to use the old version of PowerShell, you could install .Net 3.5 SP1, which is available as a "feature" for Windows. That will include the CLR version 2, and will allow you to use the older [PowerShell2:...] stanzas if you need to.

scalloway_atsu_
Explorer

I received this error after upgrading universal forwarders on 2012R2 domain controllers. Apparently SA Powershell is not needed on indexers/search head for my configuration. Disabling SA-PS on the indexers and search head stopped the errors.

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...