# Set-RASAutoUpgradeMessage

## NAME

Set-RASAutoUpgradeMessage

## SYNOPSIS

Modifies an Auto-upgrade Message within Auto-upgrade settings.

## SYNTAX

**Set-RASAutoUpgradeMessage**\
-[DefObjType](#defobjtype) {RDSDef |\
VDIDef | AVDSingleSessionDefaultSettings |\
AVDMultiSessionDefaultSettings | VDIGuestDef}\
-[MessageId](#messageid-string) _(uint)_\
\[[Enabled](#enabled-string) _(bool)_]\
\[[Message](#message-string) _(string)_]\
\[[MessageTitle](#messagetitle-string)_(string)_]\
\[[SendMsgSecs](#sendmsgsecs-string)_(uint)_]\
\[-[SendMsgWhen](#SendMsgWhen) {Before |\
After}] \[[SiteId](#siteid-string) _(uint)_]\
\[_(_[_CommonParameters_](#CommonParameters)_)_]

**Set-RASAutoUpgradeMessage**\
\[[Id](#id-string)] _(uint)_\
-[MessageId](#messageid-string) _(uint)_\
-[ObjType](#objtype) {RDSHostPool |\
VDIHostPool | AVDHostPool}\
\[[Enabled](#enabled-string) _(bool)_]\
\[[Message](#message-string) _(string)_]\
\[[MessageTitle](#messagetitle-string)_(string)_]\
\[[SendMsgSecs](#sendmsgsecs-string)_(uint)_]\
\[-[SendMsgWhen](#SendMsgWhen) {Before |\
After}]\
\[_(_[_CommonParameters_](#CommonParameters)_)_]

**Set-RASAutoUpgradeMessage**\
\[-[InputObject](#inputobject)]_(_[_RASSerilazableObj_](../types/rasserilazableobj)_)_\
-[MessageId](#messageid-string) _(uint)_\
\[[Enabled](#enabled-string) _(bool)_]\
\[[Message](#message-string) _(string)_]\
\[[MessageTitle](#messagetitle-string)_(string)_]\
\[[SendMsgSecs](#sendmsgsecs-string)_(uint)_]\
\[-[SendMsgWhen](#SendMsgWhen) {Before |\
After}]\
\[_(_[_CommonParameters_](#CommonParameters)_)_]

**Set-RASAutoUpgradeMessage**\
\[[Name](#name-string)] _(string)_\
\[\[-[SiteId](#siteid-string)] _(uint)_]\
-[MessageId](#messageid-string) _(uint)_\
-[ObjType](#objtype) {RDSHostPool |\
VDIHostPool | AVDHostPool}\
\[[Enabled](#enabled-string) _(bool)_]\
\[[Message](#message-string) _(string)_]\
\[[MessageTitle](#messagetitle-string)_(string)_]\
\[[SendMsgSecs](#sendmsgsecs-string)_(uint)_]\
\[-[SendMsgWhen](#SendMsgWhen) {Before |\
After}]\
\[_(_[_CommonParameters_](#CommonParameters)_)_]

## DESCRIPTION

Modifies an Auto-upgrade Message within Auto-upgrade settings.

## PARAMETERS

## MessageId (uint)

Auto-upgrade job message ID.

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Enabled (bool)

Whether to enable or disable the message.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MessageTitle (string)

The title of the message.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Message (string)

A message that should be sent to users before the job starts.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SendMsgSecs (uint)

Time interval in seconds before the job starts when the message to users\
should be sent.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SendMsgWhen ([SendMsgWhen](../types/sendmsgwhen))

Whether the message is sent Before/After the AutoUpgrade is triggered.

SendMsgWhen can only be set to After in the case of Reboot.

Possible values: Before, After

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Name (string)

The name or server for which to modify the Auto-upgrade settings.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

Site ID from which to modify the Auto-upgrade settings.

If the parameter is omitted, the Licensing Server site ID will be\
used.

```
        Required?                    false

        Position?                    1

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Id (uint)

The ID of a server for which to modify the Auto-upgrade settings.

```
        Required?                    true

        Position?                    0

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## InputObject

([RASSerilazableObj](../types/rasserilazableobj))\
An object of type RDS, RDSHostPool, VDITemplate or VDIDesktop for which\
to modify the Auto-upgrade settings.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ObjType ([HostPoolObjType](../types/hostpoolobjtype))

The Object Type for which to modify the Auto-upgrade settings.

Possible values: RDSHostPool, VDIHostPool, AVDHostPool

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## DefObjType ([ServerDefObjType](../types/serverdefobjtype))

The Default Object Type for which to modify the Auto-upgrade settings.

Possible values: RDSDef, VDIDef, AVDSingleSessionDefaultSettings,\
AVDMultiSessionDefaultSettings, VDIGuestDef

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

(CommonParameters)

```
        This cmdlet supports the common parameters: Verbose, Debug,

        ErrorAction, ErrorVariable, WarningAction, WarningVariable,

        OutBuffer, PipelineVariable, and OutVariable. For more information, see 

        about_CommonParameters documentation. 
```

## INPUTS

-none-

## OUTPUTS

-none-

## EXAMPLES

\*\*---------- EXAMPLE 1 ----------

Set-RASAutoUpgradeMessage -DefObjType RDSDef -MessageId 1 -Enabled 1\
-SendMsgSecs 60 -SendMsgWhen Before -MessageTitle "messageTitle"\
-Message "messageBody"

Modifies the specified message by id within the Auto-upgrade settings of\
the RDS Default Settings.\
\*\*---------- EXAMPLE 2 ----------

Set-RASAutoUpgradeMessage -Name "VDIHostPool1" -ObjType VDIHostPool\
-MessageId 1 -Enabled 1 -SendMsgSecs 60 -SendMsgWhen Before\
-MessageTitle "messageTitle" -Message "messageBody"

Modifies the specified message by id within the Auto-upgrade settings of\
the specified VDIHostPool by Name.\
\*\*---------- EXAMPLE 3 ----------

Set-RASAutoUpgradeMessage -Id 1 -ObjType AVDHostPool -MessageId 1\
-Enabled 1 -SendMsgSecs 60 -SendMsgWhen Before -MessageTitle\
"messageTitle" -Message "messageBody"

Modifies the specified message by id within the Auto-upgrade settings of\
the specified AVDHostPool by Id.

## RELATED LINKS

* [Get-RASAutoUpgrade](get-rasautoupgrade)
* [Add-RASAutoUpgradeMessage](add-rasautoupgrademessage)
* [Get-RASAutoUpgradeMessage](get-rasautoupgrademessage)
* [Remove-RASAutoUpgradeMessage](remove-rasautoupgrademessage)
