diff --git a/Scripts/Network/Get-IPInfo.ps1 b/Scripts/Network/Get-IPInfo.ps1 new file mode 100644 index 0000000..1525d55 --- /dev/null +++ b/Scripts/Network/Get-IPInfo.ps1 @@ -0,0 +1 @@ +Get-NetIPAddress | Format-Table -Property InterfaceAlias,IPAddress,AddressFamily,PrefixLength -AutoSize diff --git a/Scripts/Network/Monitor-Networking.ps1 b/Scripts/Network/Monitor-Networking.ps1 new file mode 100644 index 0000000..a8d3383 --- /dev/null +++ b/Scripts/Network/Monitor-Networking.ps1 @@ -0,0 +1,5 @@ +while ($true) { + Clear-Host + Get-NetAdapterStatistics | Format-Table -AutoSize + Start-Sleep -Seconds 1 +} diff --git a/Scripts/Network/Scan-IPPorts.ps1 b/Scripts/Network/Scan-IPPorts.ps1 new file mode 100644 index 0000000..8b03081 --- /dev/null +++ b/Scripts/Network/Scan-IPPorts.ps1 @@ -0,0 +1,13 @@ +param ( + [string]$IPAddress = "192.168.1.1", + [int[]]$Ports = @(22, 80, 443) +) + +foreach ($port in $Ports) { + $tcpConnection = Test-NetConnection -ComputerName $IPAddress -Port $port + if ($tcpConnection.TcpTestSucceeded) { + Write-Output "Port $port in $IPAddress is open." + } else { + Write-Output "Port $port in $IPAddress is closed." + } +} \ No newline at end of file diff --git a/Scripts/Network/Verify-IPConnections.ps1 b/Scripts/Network/Verify-IPConnections.ps1 new file mode 100644 index 0000000..19db71d --- /dev/null +++ b/Scripts/Network/Verify-IPConnections.ps1 @@ -0,0 +1,10 @@ +$iplist = @("192.168.1.1", "google.com", "8.8.8.8", "1.1.1.1", "192.168.224.222") + +foreach ($ip in $iplist) { + $result = Test-Connection -ComputerName $ip -Count 1 -Quiet + if ($result) { + Write-Host "$ip - CONNECTED" -ForegroundColor Green + } else { + Write-Host "$ip - NO CONNECTION" -ForegroundColor Red + } +}