Skip to content

Instantly share code, notes, and snippets.

@BenNeise
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save BenNeise/9cc7c75d1937de12f6a2 to your computer and use it in GitHub Desktop.

Select an option

Save BenNeise/9cc7c75d1937de12f6a2 to your computer and use it in GitHub Desktop.

Revisions

  1. BenNeise revised this gist Oct 6, 2014. 1 changed file with 40 additions and 0 deletions.
    40 changes: 40 additions & 0 deletions TestPingDocumentation.markdown
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    # Test-Ping

    ## Synposis
    Pings a server and returns TRUE or FALSE.

    ## Syntax
    ```PowerShell
    \Test-Ping.ps1 [-computer] <String> [<CommonParameters>]
    ```
    ## Description
    Uses WMI to ping a server, and returns TRUE if a status code of 0 is returned, otherwise returns FALSE. Useful for quick checks to see if a server exists and is online.

    ## Parameters
    ### computer
    - **Type**: String
    - **DefaultValue**: $(Throw "Computer or IP is mandatory, please provide a value.")
    - **ParameterValue**: String
    - **PipelineInput**: false
    - **Position**: 2
    - **Required**: true
    ## Examples


    ### Example 1
    ```PowerShell
    Test-Ping -Computer "SERVER01"
    ```

    Pings SERVER01











  2. BenNeise created this gist Oct 6, 2014.
    40 changes: 40 additions & 0 deletions Test-Ping documentation
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    # Test-Ping

    ## Synposis
    Pings a server and returns TRUE or FALSE.

    ## Syntax
    ```PowerShell
    \Test-Ping.ps1 [-computer] <String> [<CommonParameters>]
    ```
    ## Description
    Uses WMI to ping a server, and returns TRUE if a status code of 0 is returned, otherwise returns FALSE. Useful for quick checks to see if a server exists and is online.

    ## Paramaters
    ### computer
    - **Type**: String
    - **DefaultValue**: $(Throw "Computer or IP is mandatory, please provide a value.")
    - **ParameterValue**: String
    - **PipelineInput**: false
    - **Position**: 2
    - **Required**: true
    ## Examples


    ### Example 1
    ```PowerShell
    Test-Ping -Computer "SERVER01"
    ```

    Pings SERVER01