Author Posts

March 21, 2018 at 6:48 pm

Good afternoon,
My question is how to check range of active ports on the host, if you could give me a hint.
Sorry for the bad english, I'm Brazilian.

March 22, 2018 at 3:05 am

Just use a simple loop using a list of ports and the Test-Connection cmdlet.

Simple example:

    '25','80','389','443','445','589'| %{Test-NetConnection -ComputerName $env:COMPUTERNAME -Port $_}
    # Get parameters, examples, full and Online help for a cmdlet or function

    # Get a list of all functions
    Get-Command -CommandType Function

    # Get a list of all commandlets
    Get-Command -CommandType Cmdlet

    # Get a list of all functions for the specified name
    Get-Command -Name '*ADGroup*' -CommandType Function

    # Get a list of all commandlets for the specified name
    Get-Command -Name '*ADGroup**'  -CommandType Cmdlet

    # get function / cmdlet details
    (Get-Command -Name Test-Connection).Parameters
    Get-help -Name Test-Connection -Examples
    Get-help -Name Test-Connection -Full
    Get-help -Name Test-Connection -Online

    Get-Help about_*
    Get-Help about_Functions


    # Find all cmdlets / functions with a target parameter
    Get-Help * -Parameter Append

    Get-Command -CommandType cmdlet `
    | Where-Object { $_.parameters.keys -match 'credential'} `
    | Format-Wide name -AutoSize 

    # All Help topics locations
    explorer "$pshome\$($Host.CurrentCulture.Name)"

March 22, 2018 at 12:31 pm

Thank you, my friend, it helped me a lot.