πŸ‘¨β€πŸ’»
Jawad's Notes
  • πŸ‘¨β€πŸ«INFOSEC
    • πŸ•ΈοΈWeb
      • Burp Suite: Setting Foxyproxy
      • XSS
      • Wappalyzer
      • Directory Traversal
      • LFI
        • PHP Wrappers
        • RFI
      • Reverse Shell
        • Command Injection Quick Tips
      • File Upload
      • WPScan
      • SQL Injection
        • Schemas
        • SQLmap
        • MSSQL
        • MySQL
        • PostgreSQL
    • πŸ”§Tools
      • Whois
      • DNSRecon
      • DNSenum
      • nslookup
      • Netcat
        • Powercat
      • Nmap
        • Nmap Scripting Engine
        • Test-NetConnection
        • Grep
      • Server Message Block (SMB)
      • SNMP
      • SMTP
      • ExifTool
      • Search Engine Hacking
      • Source Control Hacking
      • Nessus
      • Canarytokens
      • Qualys SSL Server Test
      • Security Headers
      • theHarvester
      • Shodan
      • Gobuster
        • Dirb
      • Searchsploit
      • Password Cracking
        • Hashcat
        • John The Ripper
        • Hydra
        • hashID
        • CPU vs GPU
    • 🐧Linux
      • Symbols
      • cat
      • curl
      • openvpn
      • tcpdump
      • Remote Desktop
      • SmbShare
      • Tmux
      • Convert Windows-style line endings (CRLF) to Unix-style (LF)
      • SSH
    • πŸ–₯️Macros in Office
    • 🍎Enhancing Your MacOS Terminal Experience
    • 🚩CTF
      • SQL Injection
        • WHERE clause allowing retrieval of hidden data
        • Allowing login bypass
        • UNION attack, determining the number of columns returned by the query
        • UNION attack, finding a column containing text
        • UNION attack, retrieving data from other tables
        • UNION attack, retrieving multiple values in a single column
        • Querying the database type and version on Oracle
Powered by GitBook
On this page
  1. INFOSEC
  2. Tools
  3. Nmap

Test-NetConnection

In the absence of Nmap on a Windows PC, Test-NetConnection can serve as an alternative

Test-NetConnection is a PowerShell cmdlet in Windows that enables network-related testing and diagnostics. It allows users to check connectivity, test ports, and perform various network-related tasks directly from the PowerShell command line.

Usage:

Test-NetConnection [-ComputerName] <String> [-Port <Int32>] [-InformationLevel <InformationLevel>]

Key Parameters:

  • -ComputerName: Specifies the target host or IP address to test connectivity.

  • -Port: Specifies the target port number to test. If not provided, a default port is used.

  • -InformationLevel: Specifies the level of detail in the output.

Common Scenarios:

  1. Basic Connectivity Test:

    Test-NetConnection -ComputerName example.com

    Performs a basic connectivity test to the specified host.

  2. Port Test:

    Test-NetConnection -ComputerName example.com -Port 80

    Tests connectivity to a specific port on the target host.

  3. Detailed Output:

    Test-NetConnection -ComputerName example.com -Port 443 -InformationLevel Detailed

    Provides detailed information about the connection, including source and destination IP addresses.

Examples:

  • Basic connectivity test to example.com:

    Test-NetConnection -ComputerName example.com
  • Test connectivity to port 80 on example.com:

    Test-NetConnection -ComputerName example.com -Port 80
  • Detailed output for port 443 on example.com:

    Test-NetConnection -ComputerName example.com -Port 443 -InformationLevel Detailed

Resources:

PreviousNmap Scripting EngineNextGrep

Last updated 1 year ago

πŸ‘¨β€πŸ«
πŸ”§
https://learn.microsoft.com/en-us/powershell/module/nettcpip/test-netconnection?view=windowsserver2022-ps