Forge Home


A helper for writing tasks in PowerShell


21,837 latest version

4.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Feb 24th 2021

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppetlabs-powershell_task_helper', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-powershell_task_helper
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-powershell_task_helper --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



puppetlabs/powershell_task_helper — version 0.1.0 Feb 24th 2021


A helper library for Puppet Tasks written in PowerShell.

Table of Contents

  1. Description
  2. Setup - The basics of getting started with powershell_task_helper
  3. Usage - Configuration options and additional functionality
  4. Development - Guide for contributing to the module


A PowerShell helper library for use by Puppet Tasks. It provides a function that handles error generation, simplifies JSON input and output, and makes testing your task easier. It requires Bolt >= 2.4.


Beginning with powershell_task_helper

To use this library, include this module in a Puppetfile:

mod 'puppetlabs-powershell_task_helper'

Add the helper file to your task metadata:

  "files": ["powershell_task_helper/files/BoltPwshHelper/"],
  "input_method": "powershell"


Bolt automatically adds your task directory to the $env:PSModulePath, so PowerShell module auto loading will work without having to write out the Import-Module statement. If your target is using PowerShell 3.0, you will have to add an import statement.

For a complete example of using the helper file in a task, see the examples.


Puppet modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.

We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.

For more information, see the documentation in this module.