Created
September 19, 2023 17:21
-
-
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.
This file contains hidden or 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
$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