Hello,
How can I write power shell script for running btool command ?
where ever I am directly doing in powershell. That is working fine. But, when I store "C:\Program Files\Splunk\bin\splunk" cmd btool props list --debug in test.ps1 and running the script from powersell then, I am getting the error.
Unfortunately, Splunk team does not always have access to the server, so we have to either gain access (takes time and approvals) or involve the server owner to run some Splunk commands.
Rather than walk the server owner through a bunch of long command strings, we should use a script.
Write a powershell script that will:
Start in a UniversalForwarder directory..
Run btool for inputs, outputs, props, and transforms and send the output to .txt files.
Then zip up those 4 files along with the contents of /etc/apps/* and /etc/system/local/* into a single zip file as an output.
The server owner can then mail that .zip file to us and we can diagnose the UF.
Thanks,
Satya Allaparthi
... View more