Skip to content

Instantly share code, notes, and snippets.

@brianfgonzalez
Created September 19, 2023 17:21
Show Gist options
  • Save brianfgonzalez/10c1cf4870780331adca646367912b9f to your computer and use it in GitHub Desktop.
Save brianfgonzalez/10c1cf4870780331adca646367912b9f to your computer and use it in GitHub Desktop.
test port connectivity to Microsoft Endpoints using powershell. Run on Service Connection Point.
$endpoint ='aka.ms','manage.microsoft.com','dc.visualstudio.com','graph.windows.net',
'go.microsoft.com','management.azure.com','login.microsoftonline.com','aadcdn.msauth.net',
'aadcdn.msftauth.net','configmgrbits.azureedge.net','login.live.com','login.windows.net',
'account.live.com','clientconfig.passport.net','gateway.configmgr.manage.microsoft.com'
foreach ($i in $endpoint) {
$Result = (Test-NetConnection $i -Port 443).TcpTestSucceeded
if ($Result -eq $True) {
Write-Host "Connection to $i ...... Succeeded." -ForegroundColor Green
} else {
Write-Host "Connection to $i .......... failed." -ForegroundColor Red }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment