# Properties

You can define the `Initialize-PSUWidget` function to add properties to Widgets. Parameters are displayed as properties in both the widget editor and page designer.

## Initialize-PSUWidget

Define a function named `Initialize-PSUWidget` to accept parameters and define initialization logic for when the widget is shown.

```powershell
function Initialize-PSUWidget {
    param(
        [Parameter()]
        $Param1
    )
    
    if ($Param1 -eq 'Script')
    {
       $Variables["Type"] = "Script"
    }
}
```


---

# 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://docs.powershelluniversal.com/portal/portal-widgets/properties.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.
