#skype4b Get Pool Node IP Address (Front-End, Mediation, Edge, etc.)

Get-Skype4bPoolIP is one of the many PowerShell functions/utilities in my personal script toolbox repository designed to help simplify the management and administration of just about any Skype for Business / Lync Server environment. Enjoy!
##########################################################################
# Copyright (c) 201x-2017 leedesmond.com
# All Rights Reserved. Use at your own risk and responsibility.
# Get-Skype4bPoolIP.ps1
# Version 1.00
#
# USAGE:
# Get-Skype4bPoolIP “fe-pool.leedesmond.com”
# Get-Skype4bPoolIP (Get-CsService -Registrar).PoolFqdn
#
# INPUT:
# One or more FQDN of a Skype for Business / Lync Server pool(s)
#
# REQUIREMENTS:
# SkypeForBusiness / Lync PowerShell Module
#
# OUTPUT:
# Returns a hashtable object listing the internal IPv4 address and FQDN of all nodes
# in the given pool(s). The hardware load-balancer VIP or DNS load-balancing IPv4
# addresses of the pool (typically mediation server) is also included.
#
#requires -version 3.0
################################################################################
function Get-Skype4bPoolIP( [string[]]$poolFqdn )
{
$ht = @{};
$poolFqdn | % {
$ip = [System.Net.Dns]::GetHostAddresses($_).IPAddressToString;
$ht[$_] = $ip;
Write-Verbose “$ip`t$_” -Verbose;

$o = Get-CsPool -Identity $_;
$o.computers | % {
$ip = [System.Net.Dns]::GetHostAddresses($_).IPAddressToString;
$ht[$_] = $ip;
Write-Verbose “$ip`t$_” -Verbose;
}
}
Write-Output $ht;

} #Get-Skype4bPoolIP()

Leave a Reply