Here is an update regarding my post http://bartwullems.blogspot.be/2017/05/tfs-2017how-to-uninstall-elasticsearch.html.
In TFS 2018, the command to remove your ElasticSearch instance changed a little and the steps became:
- Open Powershell as an administrator
- Go to the folder where ConfigureTFSSearch.ps1 is installed. In TFS 2018, this is typically C:\Program Files\Microsoft Team Foundation Server 2018\Search\zip
- Run the ConfigureTFSSearch script with the remove option: ".\Configure-TFSSearch.ps1 -Operation remove"