# Set-RenderingParameter

Adds and updates the specified rendering parameter from the rendering.

## Syntax

```powershell
Set-RenderingParameter -Instance <RenderingDefinition> -Parameter <IDictionary> [-Overwrite]
```

## Detailed Description

Adds and updates the specified rendering parameter from the rendering.

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

## Parameters

### -Instance \<RenderingDefinition>

Rendering definition containing the rendering parameters.

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

### -Parameter \<IDictionary>

The hashtable or dictionary of key/value pairs used to add/update rendering parameters.

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

### -Overwrite \<SwitchParameter>

Specifying this parameter will remove all existing rendering parameters and use the new collection provided.

| 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.Layouts.RenderingDefinition

## Outputs

The output type is the type of the objects that the cmdlet emits.

* Sitecore.Layouts.RenderingDefinition

## Notes

Help Author: Adam Najmanowicz, Michael West

## Examples

### EXAMPLE

The following updates the specified rendering parameter and updates the item.

```powershell
$item = Get-Item -Path "master" -ID "{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}"

# Accepts Hashtable, Ordered Dictionaries, etc.
$parameters = [ordered]@{"SampleKey2"="SampleValue2"}
Get-Rendering -Item $item -FinalLayout |
    Set-RenderingParameter -Parameter $parameters | 
    Set-Rendering -Item $item -FinalLayout
```

## Related Topics

* <https://github.com/SitecorePowerShell/Console/>
* [New-Rendering](/appendix/presentation/new-rendering.md)
* [Set-Rendering](/appendix/presentation/set-rendering.md)
* [Get-Rendering](/appendix/presentation/get-rendering.md)
* [Get-LayoutDevice](/appendix/presentation/get-layoutdevice.md)
* [Remove-Rendering](/appendix/presentation/remove-rendering.md)
* [Get-Layout](/appendix/presentation/get-layout.md)
* [Set-Layout](/appendix/presentation/set-layout.md)


---

# 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/presentation/set-renderingparameter.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.
