Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

PowerShell – Check DNS For Skype For Business

Posted on May 21, 2018 By David Kittell
## CallTower PowerShell DNS Checker, This script checks all that you have all your DNS entries in place and displays the final route for DNS lookups.
##
## Usage .\Check-SRVRecords.ps1 -domain calltower.com
##
## Original Script Obtained From: https://www.uc.solutions/Skype_for_Business/Skype4B_Set_Up/How_to_verify_or_set_DNS_records_for_Skype_for_Business
##

param($domain = (Get-WmiObject win32_computersystem).Domain)

$cnameresult = Resolve-DnsName sip.$domain -Server 8.8.8.8 -ErrorAction SilentlyContinue
$lyncdiscoverresult = Resolve-DnsName lyncdiscover.$domain -Server 8.8.8.8 -ErrorAction SilentlyContinue
$federationresult = Resolve-DnsName _sipfederationtls._tcp.$domain -Type SRV -Server 8.8.8.8 -ErrorAction SilentlyContinue
$siptlsresult = Resolve-DnsName _sip._tls.$domain -Type SRV -Server 8.8.8.8 -ErrorAction SilentlyContinue
$notfound = "`tDNS Entry Not Found"

Write-Host "`r`nCNAME Result" -ForegroundColor Cyan
if ($cnameresult) {
	Write-Host "`tsip.$domain $(@(foreach ($result in $cnameresult.namehost){ '-> '+$result }))" -ForegroundColor Magenta
} else {
	Write-Host $notfound -ForegroundColor Red
}

Write-Host "`r`nLyncDiscover Result" -ForegroundColor Cyan
if ($lyncdiscoverresult) {
	Write-Host "`tlyncdiscover.$domain $(@(foreach ($result in $lyncdiscoverresult.namehost){ '-> '+$result }))" -ForegroundColor Yellow
} else {
	Write-Host $notfound -ForegroundColor Red
}

Write-Host "`r`nFederation Result" -ForegroundColor Cyan
if ($federationresult) {
	Write-Host "`t$($federationresult.NameTarget)" -ForegroundColor Green
} else {
	Write-Host $notfound -ForegroundColor Red
}

Write-Host "`r`nSIP TLS Result" -ForegroundColor Cyan
if ($siptlsresult) {
	Write-Host "`t$($siptlsresult.NameTarget)" -ForegroundColor Green
} else {
	Write-Host $notfound -ForegroundColor Red
}

Reference: https://www.uc.solutions/Skype_for_Business/Skype4B_Set_Up/How_to_verify_or_set_DNS_records_for_Skype_for_Business

All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PowerShell Windows

Post navigation

Previous post
Next post

Related Posts

GitLab – Folder Permissions Fix

Posted on November 29, 2016

If you’ve ran into a directory permissions problem with GitLab before this may be helpful. The code below is mostly based on GitLab documentation – https://docs.gitlab.com/omnibus/settings/configuration.html # Holds repositories directory sudo chown -R -v git:root /var/opt/gitlab/git-data sudo chmod -R -v 0700 /var/opt/gitlab/git-data # Holds git repositories sudo chown -R -v…

Read More

PowerShell – Windows 7 – Windows Service Cleanup

Posted on November 9, 2015

There are many services on Windows 7 that do not need to run, while some suggest disabling the service I tend to go on the side of caution and simply stop and set them to manual startup. # Stop Services and set to Manual # Home Group Sharing – start…

Read More

Compare SQL column against another column

Posted on January 29, 2015October 26, 2015

In a recent effort to clean up duplicates in my contacts I came across a script to assist me. In my situation I have some contacts that have had the company name inserted as the first/last name. SELECT id, [Company], [Title], [First Name], [Middle Name], [Last Name] FROM [OutlookContacts] WHERE…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
©2025 David Kittell | WordPress Theme by SuperbThemes