Last active
June 3, 2016 10:00
-
-
Save amandadebler/353b6306822cff7709475c05d35e1985 to your computer and use it in GitHub Desktop.
Snippets to get a list of computers by role in Skype for Business/Lync topology
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
$SBAs = (Get-CsPool).where({$_.services -like "*registrar*" -and $_.services.where({$_ -like "WebServer*"}).count -eq 0}).computers | |
$frontEndServers = (Get-CsPool).where({$_.services -like "*registrar*" -and $_.services -like "Conferencing*"}).computers | |
$directorServers = (Get-CsPool).where({$_.services -like "*registrar*" -and $_.services -like "WebServer*" -and $_.services.where({$_ -like "Conferencing*"}).count -eq 0}).computers | |
$mediationServers = (Get-CsPool).where({$_.services -like "*Mediation*" -and $_.services.where({$_ -like "registrar*"}).count -eq 0}).computers | |
$edgeServers = (Get-CsPool).where({$_.services -like "*Edge*"}).computers | |
# Limitation: does not explore the Office Web Apps Farm for individual servers | |
$OfficeWebAppServers = (Get-cspool).where({$_.services -like "*WacServer*"}).computers | |
# Filters out backup PSTN trunks to pair gateways with secondard Mediation Services - only shows PSTN trunks with "real" FQDNs | |
$PSTNGateways = (Get-CsPool).where({$_.services -like "PstnGateway*"}).computers.where({ Resolve-DnsName $_ -ErrorAction SilentlyContinue }) | |
#Excludes Standard Edition servers hosting their own FileStores | |
$fileStores = (get-cspool).where({$_.services -like "FileStore*" -and $_.services.where({$_ -like "registrar*"}).count -eq 0}).computers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment