Forum Discussion
Steve_Wojo_3284
Nov 07, 2017Nimbostratus
Looks like I was able to post, so here is the rest of my post:
Here is the output you get with the get-poolmember cmdlet:
PS C:\Windows\system32> Get-PoolMember -Address 10.10.10.10
Name Partition Address Description Monitor Session State
---- --------- ------- ----------- ------- ------- -----
10.10.10.10:443 Common 10.10.10.10 default monitor-enabled up
Here is what I currently have for the script:
$VerbosePreference = 'Continue'
[Int]$MaxRetries = 20
$RetryCount = 0; $Completed = $false
while (-not $Completed) {
if ($Node.Session -ne 'monitor-enabled') {
Write-Verbose "The pool member is disabled"
$Completed = $true
}
else {
if ($RetryCount -ge $MaxRetries) {
Write-Verbose "Failed to disable pool member within '$MaxRetries' retries"
throw "Failed to disable pool member within '$MaxRetries' retries"
} else {
Write-Verbose "site still online, retrying in 5 seconds."
Start-Sleep '5'
$RetryCount++
}
}
}
Any assistance would be greatly appreciated. Thanks!
-Steve