Not able to load template file, Invoke-WebRequest is not recognized command

(Jay) #1

Hello, I am trying to install Topbeat on windows machine, As per

I have downloaded and executed PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-topbeat.ps1.

to configured input and output modified topbeat.yaml as per document output is elasticsearch,
tried to load the index template to elastic search with given command
Topbeat> Invoke-WebRequest -Method Put -InFile topbeat.template.json -Uri http://localhost:9200/_template/topbeat?pretty

But its not working... even the start command for topbeat is not correct as per document.. Could you please help me to configure the Topbeat

while load template Elastic search is in running mode

(ruflin) #2

Do you get an errors when running the commands? Please post them here? Can you give some more details?

(Jay) #3

Still complete not installed Topbeat... but i am trying to load the sample template from beats-dashboard-masterb

I am not load the sample template with load.ps1 into Elasticsearch, seeing below error

[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R
Write-Error : Invoke-RestMethod cmdlet was not found. You may need to upgrade your PowerShell version.
At D:\basefarm\beats-dashboards-master\load.ps1:17 char:14

  • Write-Error <<<< "$CURL cmdlet was not found. You may need to upgrade your PowerShell version."
    • CategoryInfo : NotSpecified: ( [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Microsoft.PowerShell.Commands.WriteErrorCommand

Is there any alternative

(ruflin) #4

Which Windows version are you using?

(Andrew Kroh) #5

Like the error says, you probably need to update your PowerShell version. The Invoke-RestMethod command wasn't included until PowerShell 3. Check your version with:

PS C:\Users\vagrant>  $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1

How to upgrade:

(system) #6