> 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/new-pmpcdeploymenttemplate.md). Agents can also search and read this documentation through its [MCP server](https://docs.patchmypc.com/~gitbook/mcp).

# New-PmpcDeploymentTemplate

Creates a deployment template.

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

## Synopsis

Creates a deployment template.

## Syntax

{% code collapsedlinecount="10" %}

```powershell
New-PmpcDeploymentTemplate -TemplateName <String> [-OsType <OSType>] [-Default]
  [-BuiltInUpdate <BuiltInUpdate>] [-AllowAvailableUninstall] [-RemoveDesktopShortcuts]
  [-AppVersionsRetention <Int32>] [-CustomVendor <String>] [-CustomDeveloper <String>]
  [-CustomOwner <String>] [-CustomNotes <String>] [-CopyForwardAssignments]
  [-CategoryId <String[]>] [-EspProfileId <String[]>] [-RoleScopeTagId <String[]>]
  [-CustomRequirements <EditDeploymentCustomRequirementsRequest>] [-WhatIf] [-Confirm]
  [<CommonParameters>]
```

{% endcode %}

## Description

Creates a deployment template on the selected connection. A template is a stored set of deployment settings that a later deployment can start from.

Applying a template is client-side: pass the result of Get-PmpcDeploymentTemplate to New-PmpcDeployment -Template, which pre-fills the request the same way the portal pre-fills its create form. No create operation accepts a template id server-side, so there is nothing to apply remotely.

Requirements are stated in the same shape a deployment uses, so New-PmpcDeploymentRequirement produces requirements for either.

## Parameters

### -AllowAvailableUninstall

Allow users to uninstall the application from the Company Portal.

| Attribute      | Value                                          |
| -------------- | ---------------------------------------------- |
| Type           | `System.Management.Automation.SwitchParameter` |
| Required       | False                                          |
| Position       | Named                                          |
| Pipeline input | True (ByPropertyName)                          |
| Aliases        | None                                           |

### -AppVersionsRetention

How many superseded versions of the application are retained.

| Attribute      | Value                 |
| -------------- | --------------------- |
| Type           | `System.Int32`        |
| Required       | False                 |
| Position       | Named                 |
| Pipeline input | True (ByPropertyName) |
| Aliases        | None                  |

### -BuiltInUpdate

Whether the application's own updater is left enabled.

| Attribute       | Value                         |
| --------------- | ----------------------------- |
| Type            | `BuiltInUpdate`               |
| Required        | False                         |
| Position        | Named                         |
| Pipeline input  | True (ByPropertyName)         |
| Aliases         | None                          |
| Accepted values | NotAvailable, Disable, Enable |

### -CategoryId

Intune application category IDs to file the deployment under.

| Attribute      | Value                 |
| -------------- | --------------------- |
| Type           | `System.String[]`     |
| Required       | False                 |
| Position       | Named                 |
| Pipeline input | True (ByPropertyName) |
| Aliases        | None                  |

### -Confirm

Prompts you for confirmation before running the cmdlet.

| Attribute      | Value                                          |
| -------------- | ---------------------------------------------- |
| Type           | `System.Management.Automation.SwitchParameter` |
| Required       | False                                          |
| Position       | Named                                          |
| Pipeline input | False                                          |
| Aliases        | cf                                             |

### -CopyForwardAssignments

Deployments created from this template inherit the template's assignments.

| Attribute      | Value                                          |
| -------------- | ---------------------------------------------- |
| Type           | `System.Management.Automation.SwitchParameter` |
| Required       | False                                          |
| Position       | Named                                          |
| Pipeline input | True (ByPropertyName)                          |
| Aliases        | None                                           |

### -CustomDeveloper

Developer applied instead of the catalogue's.

| Attribute      | Value                 |
| -------------- | --------------------- |
| Type           | `System.String`       |
| Required       | False                 |
| Position       | Named                 |
| Pipeline input | True (ByPropertyName) |
| Aliases        | None                  |

### -CustomNotes

Free-text notes applied to deployments created from this template.

| Attribute      | Value                 |
| -------------- | --------------------- |
| Type           | `System.String`       |
| Required       | False                 |
| Position       | Named                 |
| Pipeline input | True (ByPropertyName) |
| Aliases        | None                  |

### -CustomOwner

Owner recorded against deployments created from this template.

| Attribute      | Value                 |
| -------------- | --------------------- |
| Type           | `System.String`       |
| Required       | False                 |
| Position       | Named                 |
| Pipeline input | True (ByPropertyName) |
| Aliases        | None                  |

### -CustomRequirements

Custom system requirements. Supplying them replaces the default single-architecture requirement.

| Attribute      | Value                                     |
| -------------- | ----------------------------------------- |
| Type           | `EditDeploymentCustomRequirementsRequest` |
| Required       | False                                     |
| Position       | Named                                     |
| Pipeline input | True (ByPropertyName)                     |
| Aliases        | None                                      |

### -CustomVendor

Publisher applied instead of the catalogue's.

| Attribute      | Value                 |
| -------------- | --------------------- |
| Type           | `System.String`       |
| Required       | False                 |
| Position       | Named                 |
| Pipeline input | True (ByPropertyName) |
| Aliases        | None                  |

### -Default

Make this the connection's default template, demoting whichever template currently holds that position. The default is what a deployment created without a template inherits, so this changes future creates as well as this template.

| Attribute      | Value                                          |
| -------------- | ---------------------------------------------- |
| Type           | `System.Management.Automation.SwitchParameter` |
| Required       | False                                          |
| Position       | Named                                          |
| Pipeline input | True (ByPropertyName)                          |
| Aliases        | None                                           |

### -EspProfileId

Enrollment Status Page profile IDs the deployment participates in.

| Attribute      | Value                 |
| -------------- | --------------------- |
| Type           | `System.String[]`     |
| Required       | False                 |
| Position       | Named                 |
| Pipeline input | True (ByPropertyName) |
| Aliases        | None                  |

### -OsType

Operating system the template applies to. Defaults to Windows.

| Attribute       | Value                 |
| --------------- | --------------------- |
| Type            | `OSType`              |
| Required        | False                 |
| Position        | Named                 |
| Pipeline input  | True (ByPropertyName) |
| Aliases         | None                  |
| Accepted values | Windows, MacOS        |

### -RemoveDesktopShortcuts

Remove desktop shortcuts after installing.

| Attribute      | Value                                          |
| -------------- | ---------------------------------------------- |
| Type           | `System.Management.Automation.SwitchParameter` |
| Required       | False                                          |
| Position       | Named                                          |
| Pipeline input | True (ByPropertyName)                          |
| Aliases        | None                                           |

### -RoleScopeTagId

Scope tag IDs applied to deployments created from this template.

| Attribute      | Value                 |
| -------------- | --------------------- |
| Type           | `System.String[]`     |
| Required       | False                 |
| Position       | Named                 |
| Pipeline input | True (ByPropertyName) |
| Aliases        | None                  |

### -TemplateName

Name shown when selecting the template.

| Attribute      | Value                 |
| -------------- | --------------------- |
| Type           | `System.String`       |
| Required       | True                  |
| Position       | Named                 |
| Pipeline input | True (ByPropertyName) |
| Aliases        | None                  |

### -WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

| Attribute      | Value                                          |
| -------------- | ---------------------------------------------- |
| Type           | `System.Management.Automation.SwitchParameter` |
| Required       | False                                          |
| Position       | Named                                          |
| Pipeline input | False                                          |
| Aliases        | wi                                             |

### 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 by value.

## Outputs

### DeploymentTemplateDto

The created template, read back from the service rather than echoed.

## Examples

### Example 1: Create a minimal template

{% code collapsedlinecount="10" %}

```powershell
$templateName = "Standard Windows apps $([guid]::NewGuid().ToString('N'))"
New-PmpcDeploymentTemplate -TemplateName $templateName
```

{% endcode %}

Creates a template with default settings on the selected connection.

### Example 2: Create a template that carries requirements

{% code collapsedlinecount="10" %}

```powershell
$reqs = New-PmpcDeploymentRequirement -MinimumWindowsOSVersion Windows11_21H2 -MinimumMemoryInMB 8192
$templateName = "Windows 11 baseline $([guid]::NewGuid().ToString('N'))"
New-PmpcDeploymentTemplate -TemplateName $templateName -CustomRequirements $reqs
```

{% endcode %}

Deployments created from this template start with the same requirements.

### Example 3: Create a template with an owner and notes

{% code collapsedlinecount="10" %}

```powershell
$templateName = "Company app settings $([guid]::NewGuid().ToString('N'))"
New-PmpcDeploymentTemplate -TemplateName $templateName -CustomOwner 'Workplace IT' -CustomNotes 'Managed application defaults'
```

{% endcode %}

Adds ownership and context without changing the connection's default template.

## Notes

Requires a selected company and connection. The template is created on the selected connection; there is no parameter to target another one.

Custom install scripts, PSADT version and ring configuration cannot be set here: they have no counterpart on the deployment surface this module exposes, so accepting them would store settings this module can neither show nor act on.

## Related links

* [Get-PmpcDeploymentTemplate](https://docs.patchmypc.com/patch-my-pc-cloud-api/powershell/get-pmpcdeploymenttemplate.md)
* [Set-PmpcDeploymentTemplate](https://docs.patchmypc.com/patch-my-pc-cloud-api/powershell/set-pmpcdeploymenttemplate.md)
* [New-PmpcDeployment](https://docs.patchmypc.com/patch-my-pc-cloud-api/powershell/new-pmpcdeployment.md)
* [PowerShell module](https://docs.patchmypc.com/patch-my-pc-cloud-api/powershell.md)

## See also

* SDK method: [CreateDeploymentTemplateAsync](https://docs.patchmypc.com/patch-my-pc-cloud-api/sdk/deployment-templates.md#createdeploymenttemplateasync)
* REST operation: [`POST /v1/api/deployments/templates`](https://docs.patchmypc.com/patch-my-pc-cloud-api/rest-api/applications.md#create-deployment-template)
* [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/new-pmpcdeploymenttemplate.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.
