All Apps and Add-ons

Powershell scripts and SPLUNK_HOME

scannon4
Communicator

I have the Splunk Add-On for Microsoft AD deployed to my DCs which are running universal forwarders. The powershell scripts are failing to run because the environment variable SPLUNK_HOME is not set on the Windows boxes. The universal forwarder may not be installed on the same drive letter on these servers so I cannot really add set SPLUNK_HOME to the runpowershell,cmd command. What would be the best way to set SPLUNK_HOME on these windows servers? It is maybe 20 servers so I know I could hand touch each one to add it but I was hoping there was another way.

Also, is SPLUNK_HOME not a variable that the install of the UF would normally set?

ansif
Motivator

You can use Powershell scripts or other scripts to set environment variable in n number of machines(same domain). And Powershell script can get the installed directory path.

Search forums to get handy scripts to perform.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

New Release of Federated Search: Bringing Splunk Analytics to More of Your Data

Organizations today are generating more data than ever and storing it across cloud object stores, data lakes, ...

Inside Event Intelligence: How ITSI Turns Network Alerts into Actionable Incidents

Tech Talk Inside Event Intelligence: How ITSI Turns Network Alerts into Actionable Incidents   Correlating ...

Observability Simplified: Combining User Experience, Application Performance & ...

  Tech Talk Network to App: Observability Unlocked   Today’s digital environments span applications, ...