Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. # This app runs the same tests as the Network Connection Status Indicator (NCSI) using WinHTTP, not IE as a proxy.
  2. #
  3. # Open PowerShell and navigate to this script, Run it using ./NCSItest
  4. #
  5. # Any failed tests will show in red text.
  6. cls
  7. Write-host "Any failures will show in red" -ForegroundColor Red
  8. Start-Sleep 1
  9. Write-Host ""
  10.  
  11. Write-Host "Confirming WinHTTP is not using a proxy" -ForegroundColor Green
  12. Write-Host "WinHTTP should show: " -ForegroundColor Green -NoNewLine;
  13. Write-Host "Direct access (no proxy server)" -ForegroundColor Yellow
  14. Start-Sleep 1
  15. netsh winhttp show proxy
  16. Start-Sleep 1
  17. Write-Host ""
  18.  
  19. Write-Host "Trying to reach msftconnecttest.com; You should see" -ForegroundColor Green -NoNewLine;
  20. Write-Host " StatusCode: 200" -ForegroundColor Yellow
  21. Start-Sleep 1
  22. Write-Host ""
  23.  
  24. Invoke-webrequest "http://www.msftconnecttest.com/connecttest.txt"
  25. Start-Sleep 1
  26. Write-Host ""
  27.  
  28. Write-Host "Trying to resolve dns.msftncsi.com" -ForegroundColor Green
  29. Write-Host ""
  30. Write-Host "Testing Domain Name Resolution..." -ForegroundColor Green
  31. Start-Sleep 1
  32. Write-Host ""
  33.  
  34. Resolve-DnsName "dns.msftncsi.com"
  35. Write-Host "Does IPV6 = " -ForegroundColor Green -NoNewLine;
  36. Write-Host " fd3e:4f5a:5b81::1" -ForegroundColor Yellow
  37. Write-Host "Does IPV4 = " -ForegroundColor Green -NoNewLine;
  38. Write-Host " 131.107.255.255" -ForegroundColor Yellow
  39. Write-Host""
  40. Write-Host "Network Connection Status Indicator test complete" -ForegroundColor Green
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement