Files
Flyoobe/Flyoobe.Extensions/Network Tools.ps1
T

32 lines
710 B
PowerShell
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Network Tools – Common network troubleshooting actions
# Host: console
# Options: Flush DNS; Reset Winsock; Show active connections; Test Ping (8.8.8.8)
param([string]$choice)
switch ($choice) {
"Flush DNS" {
Write-Output "Flushing DNS cache..."
ipconfig /flushdns
}
"Reset Winsock" {
Write-Output "Resetting Winsock..."
netsh winsock reset
}
"Show active connections" {
Write-Output "Active TCP connections:"
netstat -ano
}
"Test Ping (8.8.8.8)" {
Write-Output "Pinging Google DNS..."
ping 8.8.8.8
}
default {
Write-Output "Unknown option: $choice"
}
}