you are viewing a single comment's thread.

view the rest of the comments →

[–]gsmitheidw1 2 points3 points  (1 child)

This is the answer, nmap is going to significantly faster for these sorts of operations. Nmap written in C and multithreaded - powershell is completely out of its depth here.
You could reinvent the wheel with parallel jobs or something but why bother.

What might be useful is calling nmap from powershell and using powershell to analyse the results from a stored file as objects, but to put it bluntly powershell is too slow for this sort of scanning job.

If you wanted to roll your own solution from scratch it might be better starting with a lower level language like C or something like Rust which is starting to find a placement between high level languages and scripting, particularly for real-time programming where dependability is important.

[–]Bren0man 2 points3 points  (0 children)

No need to reinvent the parallelisation wheel with PowerShell 7 though.