Powershell Additional Tricks
Scanning with Powershell
1..1024 | % {echo ((new-object Net.Sockets.TcpClient).Connect("10.0.0.100",$_)) "Port $_ is open!"} 2>$null
Scripts
Scripts with extension “.ps1”, “.psm1”, “*.psd1” etc can be invoked in a specific PowerShell session as follows 👍
Import-Module <Module_Name.ps1>
However a PowerShell script can be invoked in a unique way called “dot sourcing a script
. .\<Script_Name>.ps1
Last updated