# Remove-BaseTemplate

Remove one or more base templates from a template item.

## Syntax

Remove-BaseTemplate -Item \<Item> -TemplateItem \<TemplateItem\[]>

Remove-BaseTemplate -Item \<Item> -Template \<String\[]>

Remove-BaseTemplate -Path \<String> -TemplateItem \<TemplateItem\[]>

Remove-BaseTemplate -Path \<String> -Template \<String\[]>

Remove-BaseTemplate -Id \<String> -TemplateItem \<TemplateItem\[]>

Remove-BaseTemplate -Id \<String> -Template \<String\[]>

Remove-BaseTemplate \[-Database \<String>]

## Detailed Description

The Remove-BaseTemplate command removes one or more base templates from a template item.

© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

## Parameters

### -Item \<Item>

The item to remove the base template from.

| Aliases                     |                |
| --------------------------- | -------------- |
| Required?                   | true           |
| Position?                   | named          |
| Default Value               |                |
| Accept Pipeline Input?      | true (ByValue) |
| Accept Wildcard Characters? | false          |

### -Path \<String>

Path to the item to remove the base template from.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Id \<String>

Id of the item to remove the base template from.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -TemplateItem \<TemplateItem\[]>

Sitecore item or list of items of base templates to remove.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Template \<String\[]>

Path representing the template item to remove as a base template. This must be of the same database as the item to be altered. Note that this parameter only supports a single template.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Database \<String>

Database containing the item to remove the base template from - required if item is specified with Id.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | false |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

## Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

* Sitecore.Data.Items.Item

## Notes

Help Author: Adam Najmanowicz, Michael West, Alex Washtell

## Examples

### EXAMPLE 1

Remove base template of /sitecore/templates/User Defined/BaseTemplate from a template, using a path.

```powershell
PS master:\> Remove-BaseTemplate -Path "master:/sitecore/content/User Defined/Page" -Template "/sitecore/templates/User Defined/BaseTemplate"
```

### EXAMPLE 2

Remove multiple base templates from a template, using items.

```powershell
PS master:\> $baseA = Get-Item -Path master:/sitecore/content/User Defined/BaseTemplateA
       PS master:\> $baseB = Get-Item -Path master:/sitecore/content/User Defined/BaseTemplateB
       PS master:\> Remove-BaseTemplate -Path "master:/sitecore/content/User Defined/Page" -TemplateItem @($baseA, $baseB)
```

## Related Topics

* [Add-BaseTemplate](/appendix/common/add-basetemplate.md)
* [Get-ItemTemplate](/appendix/common/get-itemtemplate.md)
* [Set-ItemTemplate](/appendix/common/set-itemtemplate.md)
* <https://github.com/SitecorePowerShell/Console/>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.sitecorepowershell.com/appendix/common/remove-basetemplate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
