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

**URL:** <https://discuss.elastic.co/t/not-able-to-load-template-file-invoke-webrequest-is-not-recognized-command/39664>\
**Category:** Beats\
**Created:** [January 20, 2016, 2:21pm UTC](https://discuss.elastic.co/t/not-able-to-load-template-file-invoke-webrequest-is-not-recognized-command/39664 "2016-01-20T14:21:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayaram](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jayaram](https://discuss.elastic.co/u/jayaram)\
**Post date:** [January 20, 2016, 2:21pm UTC](https://discuss.elastic.co/t/not-able-to-load-template-file-invoke-webrequest-is-not-recognized-command/39664/1 "2016-01-20T14:21:36Z")

</div>

Hello, I am trying to install Topbeat on windows machine, As per [https://www.elastic.co/guide/en/beats/topbeat/current/topbeat-getting-started.html](https://www.elastic.co/guide/en/beats/topbeat/current/topbeat-getting-started.html)

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](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

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [January 21, 2016, 8:22am UTC](https://discuss.elastic.co/t/not-able-to-load-template-file-invoke-webrequest-is-not-recognized-command/39664/2 "2016-01-21T08:22:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jayaram](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jayaram](https://discuss.elastic.co/u/jayaram)\
**Post date:** [January 22, 2016, 9:16am UTC](https://discuss.elastic.co/t/not-able-to-load-template-file-invoke-webrequest-is-not-recognized-command/39664/3 "2016-01-22T09:16:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [January 22, 2016, 9:32am UTC](https://discuss.elastic.co/t/not-able-to-load-template-file-invoke-webrequest-is-not-recognized-command/39664/4 "2016-01-22T09:32:21Z")

</div>

Which Windows version are you using?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [January 22, 2016, 7:38pm UTC](https://discuss.elastic.co/t/not-able-to-load-template-file-invoke-webrequest-is-not-recognized-command/39664/5 "2016-01-22T19:38:15Z")

</div>

> [@jayaram](#):
>
> Write-Error : Invoke-RestMethod cmdlet was not found. You may need to upgrade your PowerShell version.

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:

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

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

```

How to upgrade: [http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx](http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 9:56pm UTC](https://discuss.elastic.co/t/not-able-to-load-template-file-invoke-webrequest-is-not-recognized-command/39664/6 "2017-07-05T21:56:28Z")

</div>


