Hi PowerShell fellows,
In this video I show you how to use PowerShell 7 cmdlets for various network tasks.
Find the code samples at the very bottom.
Hope you enjoy it!
### Ping (PowerShell 7 required for -TargetName) Test-Connection -TargetName sid-500.com -Count 1 -Quiet -IPv4 ### Remote-Ping (domain only) Test-Connection -ComputerName server01 -TargetName sid-500.com -Count 1 -Quiet -IPv4 ### Traceroute Test-Connection -TargetName sid-500.com -Traceroute ### Port-Scan Test-NetConnection -ComputerName sid-500.com -Port 443 ### Show open ports Get-NetTCPConnection -State Established,Listen | Sort-Object LocalPort
getting error on -targetname and -ipv4.
PS C:\WINDOWS\system32> Test-connection -targetname sid-500.com -Quiet -ipv4
Test-Connection : A parameter cannot be found that matches parameter name ‘targetname’.
At line:1 char:17
+ Test-connection -targetname sid-500.com -Quiet -ipv4
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Test-Connection], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.TestConnectionCommand
LikeLiked by 1 person
Thank you. PowerShell 7 is required for this, I forgot to mention.
LikeLike