Overview
The nmap module automates installation and updates of the
Nmap network scanner.
It ensures Nmap is installed to a predictable location, provides quick
version checks, and exposes the path to the executable for automation.
Installation
Install-Module nmap
Commands
Install-Nmap— Download and install Nmap to$HOME\Tools\nmap.Update-Nmap— Check the current version and update if newer is available.Get-NmapVersion— Return the installed Nmap version (if present).Get-NmapPath— Return the full path tonmap.exe.
Examples
# Install Nmap
Install-Nmap
# Check installed version
Get-NmapVersion
# Update if not latest
Update-Nmap
# Get path to executable
Get-NmapPath
# Run a scan manually (after install)
& (Get-NmapPath) -sV scanme.nmap.org
Notes
- This module manages Nmap itself, not PowerShell wrappers for scanning.
- After installation, use
& (Get-NmapPath) <args>to run Nmap commands. - Default install path:
$HOME\Tools\nmap\nmap.exe. - The current script sets the expected latest version manually (7.94).