Last active
February 16, 2016 17:27
-
-
Save secabstraction/02992616f3ebc4c4bcce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a connection pool | |
$Pool = New-ConnectionPool -Nodes @('http://test1:9200','http://test2:9200') -Sniffing | |
# Create a connection configuration from the pool | |
$Config = New-ConnectionConfiguration -Pool $Pool | |
# Tweak the configuration | |
$Config.SetBasicAuthentication('username','password') | |
$Config.SetProxy('http://myproxy:8080','username','password') | |
# Create a client from the configuration | |
$Client = New-ElasticClient -Configuration $Config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment