---
name: "PowerShell"
description: "Runs a PowerShell script using Buildkite."
author: "buildkite"
repo: "powershell-example"
stars: 1
demo: "https://buildkite.com/buildkite/powershell-example/builds/latest?branch=main"
---

# Buildkite PowerShell Pipeline Example


This repository is an example [Buildkite](https://buildkite.com/) pipeline that runs a simple PowerShell script: [`script.ps1`](https://github.com/buildkite/powershell-example/blob/HEAD/script.ps1).



See the full [Getting Started Guide](https://buildkite.com/docs/guides/getting-started) for step-by-step instructions on how to get this running.


<a href="https://buildkite.com/buildkite/powershell-example/builds/latest?branch=main">
  <img width="2400" alt="Screenshot of PowerShell example pipeline build page" src="https://raw.githubusercontent.com/buildkite/powershell-example/main/.buildkite/screenshot.png" />
</a>

<!-- docs:start -->

## How it works

This example:
- Runs [`script.ps1`](https://github.com/buildkite/powershell-example/blob/HEAD/script.ps1) as part of the pipeline
- Prints debug output and an inline image
- Uploads a test artifact
- Exits cleanly with success (`exit 0`)

PowerShell can be used for many build, deploy, or scripting tasks across Windows, Linux, and macOS agents.

<!-- docs:end -->

## License

See [LICENSE.md](https://github.com/buildkite/powershell-example/blob/HEAD/LICENSE.md) (MIT)