< Back

Get-HealthCheck

Sun Jan 19, 2020 5:53 pm

NAME Get-HealthCheck



SYNOPSIS

The Get-HealthCheck cmdlet will list all checks associated with the account.





SYNTAX

Get-HealthCheck [[-ApiKey] <Uri>] [<CommonParameters>]





DESCRIPTION

The Get-HealthCheck cmdlet will list all checks associated with the account.



An API key is required to use this cmdlet.





PARAMETERS

-ApiKey <Uri>

The Api key for your account.



Required? false

Position? 1

Default value $script:SavedHealthCheckApi

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String



This cmdlet takes the AccountID and ApplicationKey as strings.





OUTPUTS

Check



This cmdlet returns a check object for each check found.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-HealthCheck



Grace : 900

LastPing : Saturday, July 9, 2016 6:58:43 AM

PingCount : 1

Name : Api test 1

NextPing : Saturday, July 9, 2016 7:58:43 AM

PingURL : https://hchk.io/25c55e7c-8092-4d21-ad06-7dacfbb6fc10

Tags : foo

Timeout : 3600



Grace : 60

LastPing :

PingCount : 0

Name : Api test 2

NextPing :

PingURL : https://hchk.io/7e1b6e61-b16f-4671-bae3-e3233edd1b5e

Tags : bar baz

Timeout : 60



The cmdlet above will return all checks for the account.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-B2Bucket | Where-Object {$_.Name -eq 'Api test 2'}



Grace : 60

LastPing :

PingCount : 0

Name : Api test 2

NextPing :

PingURL : https://hchk.io/7e1b6e61-b16f-4671-bae3-e3233edd1b5e

Tags : bar baz

Timeout : 60



The cmdlet above will return all buckets and search for the one with a name of "Api test 2".











RELATED LINKS

https://healthchecks.io/docs/