This module creates a partition and mounts it to an accesspath on Windows.




3,834 latest version

4.5 quality score

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Mar 1st 2018
This version is compatible with:
  • windows

Start using this module


witsec/partitionaccesspath — version 0.1.1 Mar 1st 2018


Table of Contents

  1. Description
  2. Setup - The basics of getting started with partitionaccesspath
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module


This module creates a partition and mounts it to an accesspath on Windows.

Module Description

This module introduces a small defined type partitionaccesspath. It shrinks an existing partition and then creates a new (raw or formatted) partition, which gets mounted to an accesspath. It is only supported on Windows.


Setup Requirements

  • partitionaccesspath makes use of Powershell, you'll need at least version 4.0 installed in order to use this module. This is available from Windows 2012 R2 and beyond.

Beginning with partitionaccesspath

To create a new partition and mount it automatically:

partitionaccesspath { 'Data':
  driveletter => 'D',
  size        => '3GB',
  accesspath  => 'C:\Storage\Data',
  filesystem  => 'ntfs',


Defined Types

  • partitionaccesspath: Create a partition and mount it to an accesspath



This is the driveletter of the partition that will be shrunk with size.


The desired size of the partition. The acceptable values for this parameter are: Bytes, KB, MB, GB, or TB.


The path on which the new partition needs to be mounted.


Filesystem can either be 'raw', 'ntfs' or 'fat32'. After the new partition is created, it will be formatted to the filesystem that is set in the manifest.
If filesystem is omitted or set to raw (which is the default value), it will skip this step and leave the partition as is - raw.


This module is tested on the following platforms:

  • Windows 2012 R2
  • Windows 2016

It is tested with Puppet EE only.