Created
February 17, 2015 12:01
-
-
Save karolikl/a7be56be079f2ea624d6 to your computer and use it in GitHub Desktop.
Add server to Network Load Balancer
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
Import-Module NetworkLoadBalancingClusters | |
function Start-Node(){ | |
$nodeName = $OctopusParameters['NLBNodeName']; | |
Write-Host "Starting node with name: $nodeName" | |
$nodeResult = Start-NlbClusterNode $nodeName | |
$state = $nodeResult.State.ToString() | |
Write-Host "State of $nodeName is $state" | |
if ($state.ToString() -NotMatch "converged"){ | |
Write-Error "Node is still stopped, manual intervention is needed..." | |
} | |
Write-Host "Successfully started $nodeName" | |
} | |
Start-Node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment