Install Elastic Search using Powershell

Hi, I'm currently using Powershell to install Elastic Search and Kibana as my command prompt is not working. I'm unable to install by running ".\elasticsearch.bat" on powershell. Can anyone assist with my issue?

Hi @kottak01 Welcome to the community.

Hopefully you're following our official documents carefully line by line.

It is very important that you execute the commands from the correct directories.

If so, you'll notice the command is run from the home directory not inside the bin directory.

.\bin\elasticsearch.bat

Also, if you want help, you should always
Show us exactly what command you executed and show us the result of the command. We can't help without that kind of information.

Hi Stephen, thanks for the prompt reply. Nothing happens when i run the command in Powershell.

Please don't post images of text. Please take the time to cut and paste the text.

I would clean up the directory and unzip again and try again.

Go into the bin directory and show a directory listing

Hi Stephen,
I've deleted the directory and unzipped again.
Here are the list of contents in the bin directory below

PS C:\Program Files\elasticsearch-8.12.2\bin> ls

Directory: C:\Program Files\elasticsearch-8.12.2\bin

Mode LastWriteTime Length Name


-a---- 3/8/2024 10:52 AM 101 elasticsearch
-a---- 3/8/2024 10:52 AM 376 elasticsearch-certgen
-a---- 3/8/2024 10:52 AM 525 elasticsearch-certgen.bat
-a---- 3/8/2024 10:52 AM 376 elasticsearch-certutil
-a---- 3/8/2024 10:52 AM 525 elasticsearch-certutil.bat
-a---- 3/8/2024 10:52 AM 674 elasticsearch-cli
-a---- 3/8/2024 10:52 AM 765 elasticsearch-cli.bat
-a---- 3/8/2024 10:52 AM 353 elasticsearch-create-enrollment-token
-a---- 3/8/2024 10:52 AM 502 elasticsearch-create-enrollment-token.bat
-a---- 3/8/2024 10:52 AM 352 elasticsearch-croneval
-a---- 3/8/2024 10:52 AM 501 elasticsearch-croneval.bat
-a---- 3/8/2024 10:52 AM 2371 elasticsearch-env
-a---- 3/8/2024 10:52 AM 2595 elasticsearch-env-from-file
-a---- 3/8/2024 10:52 AM 2540 elasticsearch-env.bat
-a---- 3/8/2024 10:52 AM 84 elasticsearch-geoip
-a---- 3/8/2024 10:52 AM 242 elasticsearch-geoip.bat
-a---- 3/8/2024 10:52 AM 87 elasticsearch-keystore
-a---- 3/8/2024 10:52 AM 245 elasticsearch-keystore.bat
-a---- 3/8/2024 10:52 AM 55 elasticsearch-node
-a---- 3/8/2024 10:52 AM 208 elasticsearch-node.bat
-a---- 3/8/2024 10:52 AM 172 elasticsearch-plugin
-a---- 3/8/2024 10:52 AM 336 elasticsearch-plugin.bat
-a---- 3/8/2024 10:52 AM 376 elasticsearch-reconfigure-node
-a---- 3/8/2024 10:52 AM 525 elasticsearch-reconfigure-node.bat
-a---- 3/8/2024 10:52 AM 353 elasticsearch-reset-password
-a---- 3/8/2024 10:52 AM 502 elasticsearch-reset-password.bat
-a---- 3/8/2024 10:52 AM 353 elasticsearch-saml-metadata
-a---- 3/8/2024 10:52 AM 502 elasticsearch-saml-metadata.bat
-a---- 3/8/2024 10:52 AM 126600 elasticsearch-service-mgr.exe
-a---- 3/8/2024 10:52 AM 353 elasticsearch-service-tokens
-a---- 3/8/2024 10:52 AM 502 elasticsearch-service-tokens.bat
-a---- 3/8/2024 10:52 AM 142984 elasticsearch-service-x64.exe
-a---- 3/8/2024 10:52 AM 262 elasticsearch-service.bat
-a---- 3/8/2024 10:52 AM 353 elasticsearch-setup-passwords
-a---- 3/8/2024 10:52 AM 502 elasticsearch-setup-passwords.bat
-a---- 3/8/2024 10:52 AM 55 elasticsearch-shard
-a---- 3/8/2024 10:52 AM 208 elasticsearch-shard.bat
-a---- 3/8/2024 10:52 AM 403 elasticsearch-sql-cli
-a---- 3/8/2024 10:52 AM 3190250 elasticsearch-sql-cli-8.12.2.jar
-a---- 3/8/2024 10:52 AM 610 elasticsearch-sql-cli.bat
-a---- 3/8/2024 10:52 AM 353 elasticsearch-syskeygen
-a---- 3/8/2024 10:52 AM 502 elasticsearch-syskeygen.bat
-a---- 3/8/2024 10:52 AM 353 elasticsearch-users
-a---- 3/8/2024 10:52 AM 502 elasticsearch-users.bat
-a---- 3/8/2024 10:52 AM 244 elasticsearch.bat

Hi Stephen, I've managed to install Elasticsearch using docker. Thanks for your help and patience. You can close this issue

1 Like

Excellent.
We don't close issues, they just age out.

You can install ES directly on Windows, no need for Docker, just use different command:
.\elasticsearch-service.bat install Elasticsearch
If you want to change the service params:
.\elasticsearch-service.bat manager Elasticsearch
If you have permission issues, start PS with admin privileges.
The .\elasticsearch.bat command is used to start ES as a process.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.