Splunk “Inputs.config” file change request based on NETBIOS NAME.


Hello Team,

Greetings for the day. Once again i am stuck on one project for which i need your help. “Our TAG line says no question is silly question” so i dare to ask this one :).
I have one requirement to change one Splunk Configuration File located at “C:Program FilesSplunkUniversalForwarderetcsystemlocal” file name Inputs.config.

This is the data in the file if we open with notepad

host = OLDNAME

I want to read the NETBIOS name of the server and change OLDNAME to actual server name. So if my server name is HTMD.com then i need the entry to replace OLDNAME with HTMD.com.
Not restricting myself with options so BAT script, PS, Application, Package, Configuration Item, from SCCM or without SCCM. All options are welcome.


solved 0
Deepak Rai 6 months 2020-08-13T21:46:41+05:30 2 Answers 84 views Admin 0

Answers ( 2 )


    Me too Sir. I was trying my luck if anyone writes then i will be saved.

    Had to write one liner. Tested and worked Sir.

    (Get-Content “C:\Program Files\SplunkUniversalForwarder\etc\system\local\inputs.conf” -Raw) -replace ‘( = ).*’, ” = $1$($env:COMPUTERNAME)” | Set-Content “C:\Program Files\SplunkUniversalForwarder\etc\system\local\inputs.conf”


    The best is to use CI and script to check the name and change the name if it’s not as per the requirement

    Unfortunately I don’t have script to do this as you know I don’t like coding

    Best answer
    Cancel the best answer

Leave an answer

Sorry, you do not have a permission to answer to this question .