Getting Data In

Installing the splunk-reskit-powershell

admoseley
Explorer

I'm having issue getting started with the Splunk-reskit-Powershell module.

The Getting Started with the Splunk PowerShell Resource Kit document shows you how to get started without actually telling you where the place the files found in the SDK repository @
https://github.com/splunk/splunk-reskit-powershell

So looking at other powershell documentation I manually recreated the folder structure at splunk-reskit-powershell / Source / Splunk on the site and copied it to C:\Windows\System32\WindowsPowerShell\v1.0\Modules

So now if I run

PS C:> Get-Module -ListAvailable -Name Splunk

ModuleType Name ExportedCommands


Manifest Splunk {}

I can see Splunk is listed.. but the ExportedCommands is not the same as the documentation output:

PS > Get-Module –ListAvailable –Name Splunk

ModuleType Name ExportedCommands


Script Splunk {Set-SplunkLicensePool, ...


My Folder structure is as follows:
PS C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Splunk> ls

Directory: C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Splunk

Mode LastWriteTime Length Name

---- ------------- ------ ----

d---- 3/13/2012 11:18 AM en-US

d---- 3/13/2012 11:18 AM FormatFiles

d---- 3/13/2012 11:18 AM Splunk-Authentication

d---- 3/13/2012 11:18 AM Splunk-Core

d---- 3/13/2012 11:18 AM Splunk-Deployment

d---- 3/13/2012 11:18 AM Splunk-General

d---- 3/13/2012 11:18 AM Splunk-Helper

d---- 3/13/2012 11:18 AM splunk-license

d---- 3/13/2012 11:18 AM Splunk-Search

d---- 3/13/2012 11:18 AM Splunk-SplunkD

-a--- 3/13/2012 1:52 PM 33687 Splunk.psd1

-a--- 3/13/2012 11:11 AM 60625 Splunk.psm1

-a--- 3/13/2012 11:12 AM 36413 SplunkConnectionObject.xml

-a--- 3/13/2012 11:12 AM 37123 Splunk_SDK_Demo.ps1


And If I perform an import I get the following:

PS C:\users\axm3196\desktop> Import-Module -Name Splunk
Import-Module : The module manifest 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Splunk\Splu
nk.psd1' could not be processed because it is not a valid PowerShell restricted language file. Plea
se remove the elements that are not permitted by the restricted language: The '<' operator is reser
ved for future use.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Splunk\Splunk.psd1:83 char:47
+ <a href="/splunk" itemprop="url"> < <<<< span itemprop="title">splunk</span>
At line:1 char:14
+ Import-Module <<<< -Name Splunk
+ CategoryInfo : ResourceUnavailable: (C:\WINDOWS\syst...unk\Splunk.psd1:String) [Imp
ort-Module], MissingMemberException
+ FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Commands.ImportModuleCo
mmand


What page did I miss in the instructions because the documentation I'm finding assumes I already know how to install these files and that does not appear to be the case.

Thanks in advance.
Adrian

0 Karma
1 Solution

admoseley
Explorer

I found my issue. It appears the content of my files had some illegal characters from copying off the site. #UserError

I found the zip/tar of the files on the site https://github.com/splunk/splunk-reskit-powershell/downloads

I aslo found the import modules documentation on Microsoft technet. All is well! 🙂

http://technet.microsoft.com/en-us/library/ee308287(v=WS.10).aspx#BKMK_ImportingAllModules

View solution in original post

admoseley
Explorer

I found my issue. It appears the content of my files had some illegal characters from copying off the site. #UserError

I found the zip/tar of the files on the site https://github.com/splunk/splunk-reskit-powershell/downloads

I aslo found the import modules documentation on Microsoft technet. All is well! 🙂

http://technet.microsoft.com/en-us/library/ee308287(v=WS.10).aspx#BKMK_ImportingAllModules

ginger8990
Explorer

splunk-reskit-powershell required splunk license file?

0 Karma

jkat54
SplunkTrust
SplunkTrust

@ginger8990 no, there is no license requirement for the resourcekit. In future, please open a separate question instead of tagging onto someone else question/answer.

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!

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...