> For the complete documentation index, see [llms.txt](https://docs.patchmypc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.patchmypc.com/patch-my-pc-cloud-api/powershell/test-pmpccloudhealth.md). Agents can also search and read this documentation through its [MCP server](https://docs.patchmypc.com/~gitbook/mcp).

# Test-PmpcCloudHealth

Checks whether the Cloud Customer API responds to a heartbeat request.

[Back to the Cloud Customer API overview](https://docs.patchmypc.com/patch-my-pc-cloud-api)

## Synopsis

Checks whether the Cloud Customer API responds to a heartbeat request.

## Syntax

{% code collapsedlinecount="10" %}

```powershell
Test-PmpcCloudHealth [<CommonParameters>]
```

{% endcode %}

## Description

Returns a boolean indicating whether the session received a heartbeat response from the Cloud Customer API. This is a reachability check, not a check of every service dependency.

## Parameters

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## Inputs

### None

This cmdlet does not accept pipeline input.

## Outputs

### System.Boolean

True when a heartbeat response is received; otherwise False.

## Examples

### Example 1: Check service health

{% code collapsedlinecount="10" %}

```powershell
Test-PmpcCloudHealth
```

{% endcode %}

Returns True when a heartbeat response is received.

### Example 2: Gate a script on service health

{% code collapsedlinecount="10" %}

```powershell
if (-not (Test-PmpcCloudHealth)) { Write-Warning 'Patch My PC Cloud is unhealthy; skipping publish.'; return }
```

{% endcode %}

Skips the upload when the health check cannot obtain a heartbeat response. The warning alone does not identify the cause.

## Notes

Connect before running this cmdlet; without an active module session it reports a not-connected error. With a session, a failed health check returns $false, including network or token-acquisition failures and a missing selected company. A false result does not distinguish these causes.

## Related links

* [PowerShell module](https://docs.patchmypc.com/patch-my-pc-cloud-api/powershell.md)

## See also

* SDK method: [IsServiceHealthyAsync](https://docs.patchmypc.com/patch-my-pc-cloud-api/sdk/authentication.md#isservicehealthyasync)
* [Cross-reference: cmdlets, SDK methods, and REST operations](https://docs.patchmypc.com/patch-my-pc-cloud-api/cross-reference.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.patchmypc.com/patch-my-pc-cloud-api/powershell/test-pmpccloudhealth.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
