Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Perform a Network Scan on Windows Using Native Tools

Network scanning, often referred to as "varredura" in Portuguese, is a process used to identify active devices on a network, discover open ports, and gather information about the network's topology. While the term "varredura" might not directly translate to a specific Windows feature, network scanning is a common task that can be performed using various tools available in the Windows environment.

In Windows, there are several ways to perform network scanning using built-in tools and command-line utilities. Although Windows does not have a dedicated command called "varredura," you can achieve similar results using tools like PowerShell and Command Prompt (CMD).

Examples:

  1. Using PowerShell to Scan for Active Devices:

    PowerShell is a powerful scripting language and command-line shell that can be used to perform network scans. Below is an example of how to use PowerShell to scan for active devices on your local network.

    # Define the network range
    $networkRange = "192.168.1.0/24"
    
    # Use the Test-Connection cmdlet to ping each address in the range
    1..254 | ForEach-Object {
       $ip = "192.168.1.$_"
       if (Test-Connection -ComputerName $ip -Count 1 -Quiet) {
           Write-Host "$ip is online"
       }
    }

    This script iterates over the IP addresses in the specified range and uses the Test-Connection cmdlet to check if each IP is reachable.

  2. Using CMD with the PING Command:

    While CMD does not have a built-in network scanning tool, you can use the PING command in combination with a batch script to perform a basic scan.

    @echo off
    for /L %%i in (1,1,254) do (
       ping -n 1 -w 100 192.168.1.%%i > nul
       if not errorlevel 1 echo 192.168.1.%%i is online
    )

    This batch script pings each IP address in the subnet and displays which addresses are online.

  3. Using NETSTAT to Discover Open Ports:

    The NETSTAT command can be used to display active connections and listening ports on your local machine.

    netstat -an

    This command lists all active TCP connections and listening ports, which can help identify open ports on your machine.

While Windows does not have a direct equivalent to "varredura" as a single command, the examples above demonstrate how to perform network scanning tasks using available tools in the Windows environment. These methods provide a way to identify active devices and open ports, helping you manage and secure your network effectively.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.