@ksing Thanks for sharing the script, it's running fine. But, still the Splunk Service is not running, please refer to the below output details. Additionally, am thinking that the existing version was not uninstalled properly/corrupted. Is there proper way to clean existing Splunk entries from the device? Thanks. Output: Status Name DisplayName ------ ---- ----------- Stopped SplunkForwarder SplunkForwarder Service SplunkForwarder service is Running on Copying necessary files for splunk ... stopping splunk service copying C:\splunk_install copy C:\splunk_install complete copying Copy-Item : Cannot bind argument to parameter 'Path' because it is null. At line:18 char:26 + Copy-Item -Recurse -Path $opappsrc -Destination $appPath -Force + ~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Copy-Item], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.CopyItemCommand copy conmplete Start-Service : Service 'SplunkForwarder Service (SplunkForwarder)' cannot be started due to the following error: Cannot start service SplunkForwarder on computer '.'. At line:20 char:1 + Start-Service -Name SplunkForwarder + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommand Exception + FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand Validating by checking if service is running. Get-Service : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At line:22 char:51 + Get-Service -Name "SplunkForwarder" -ComputerName $file -ErrorAction ... + ~~~~~ + CategoryInfo : InvalidData: (:) [Get-Service], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.GetServiceCommand SplunkForwarder service is Running on Complete
... View more