资 源 简 介
A small example of how you can use Splunk .NET SDK to create a powershell snap-in.
Getting started
Download and install powershell and .Net framework
http://go.microsoft.com/fwlink/?LinkId=79444
how-to:
http://msdn.microsoft.com/en-us/library/bb204630(VS.85).aspx
Extract contents of the attached package in some temp directory
c: emp
Open powershell and register the Splunk snap-in by executing this command:
c:WINDOWSMicrosoft.NETFrameworkv2.0.50727installutil.exe c: empSplunkPowerShell.dll
Check that registration was successful. In powershell, type:
get-pssnapin -registered
make sure "splunk_test" is in there
Tell powershell that it"s ok to run our unsigned script:
Set-ExecutionPolicy RemoteSigned<