# New-RASNotificationResource

## NAME

New-RASNotificationResource

## SYNOPSIS

Creates new resource notification.

## SYNTAX

**New-RASNotificationResource**\
\[-[Type](#Type)] {CPUEvent |\
MemoryEvent | RDSHConnectedSessionEvent | ConnectedSessionEvent |\
RDSHDisconnectedSessionEvent | DisconnectSessionEvent |\
RDSHConnectedSessionEventPerc | RDSHConnectSessionEvent |\
RDSHDisconnectedSessionEventPerc | RDSHDisconnectSessionEvent |\
TunneledSess}\
\[[AllServers](#allservers-string)_(bool)_] \[-[Direction](#Direction)\
{RisesAbove | LowersBelow}]\
\[[EnableGracePeriod](#enablegraceperiod-string)_(bool)_]\
\[[EnableInterval](#enableinterval-string)_(SwitchParameter)_]\
\[[ExecuteScript](#executescript-string)_(SwitchParameter)_]\
\[[GracePeriod](#graceperiod-string)_(uint)_] \[[Interval](#interval-string)_(uint)_]\
\[-[Recipients](#Recipients)_(string\[])_]\
\[[ScriptId](#scriptid-string) _(uint)_]\
\[-[ScriptObject](#ScriptObject)_(_[_NotificationScript_](../types/notificationscript)_)_]\
\[[SendEmail](#sendemail-string) _(bool)_]\
\[[SiteId](#siteid-string) _(uint)_]\
\[-[TargetIds](#TargetIds)_(List\`1)_]\
\[-[TargetType](#TargetType) {AllServers\
\| RDSHostPools | RDSHGroups | VDIHostPools | VDIPools |\
AVDHostPools | RemotePCs | SecureGateways | Gateways | Brokers |\
PublishingAgents | EnrollmentServers | ForceAllAgents}]\
\[[Threshold](#threshold-string) _(uint)_]\
\[[WaitUntilRecovered](#waituntilrecovered-string)_(SwitchParameter)_]\
\[_(_[_CommonParameters_](#CommonParameters)_)_]

## DESCRIPTION

Creates a resource notification, such as high/low RAM/CPU usage etc.

## PARAMETERS

## Type

([RASNotificationResourceType](../types/rasnotificationresourcetype))\
Resource notification type.

Possible values: CPUEvent, MemoryEvent, RDSHConnectedSessionEvent,\
ConnectedSessionEvent, RDSHDisconnectedSessionEvent,\
DisconnectSessionEvent, RDSHConnectedSessionEventPerc,\
RDSHConnectSessionEvent, RDSHDisconnectedSessionEventPerc,\
RDSHDisconnectSessionEvent, TunneledSess

```
        Required?                    true

        Position?                    1

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Threshold (uint)

Tolerance value which triggers notification.

```
        Required?                    false

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Direction

([ThresholdDirection](../types/thresholddirection))\
Threshold direction.

Possible values: RisesAbove, LowersBelow

```
        Required?                    false

        Position?                    named

        Default value                RisesAbove

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

Site ID where notification event is setup.

Current site ID is used if siteId is omitted.

```
        Required?                    false

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## GracePeriod (uint)

Grace period after the notification was done (minutes).

```
        Required?                    false

        Position?                    named

        Default value                5

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## EnableGracePeriod (bool)

Enable/Disable grace period.

```
        Required?                    false

        Position?                    named

        Default value                True

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Recipients (string\[])

Recipients to notify of the event.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SendEmail (bool)

Enable/Disable email notification.

```
        Required?                    false

        Position?                    named

        Default value                True

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ScriptId (uint)

Script to execute which has this ID.

```
        Required?                    false

        Position?                    named

        Default value                4294967295

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ScriptObject

([NotificationScript](../types/notificationscript))\
Script Object.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ExecuteScript (SwitchParameter)

```
        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Interval (uint)

Invocation interval (minutes).

```
        Required?                    false

        Position?                    named

        Default value                10

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## EnableInterval (SwitchParameter)

Enable/Disable notification intervals.

```
        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## WaitUntilRecovered (SwitchParameter)

Wait until recovered.

```
        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## AllServers (bool)

All servers in site.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## TargetType ([TargetType](../types/targettype))

Target type.

Possible values: AllServers, RDSHostPools, RDSHGroups, VDIHostPools,\
VDIPools, AVDHostPools, RemotePCs, SecureGateways, Gateways, Brokers,\
PublishingAgents, EnrollmentServers, ForceAllAgents

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## TargetIds (List\`1)

Target Ids.

```
        Required?                    false

        Position?                    named

        Default value                

        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

[NotificationResource](../types/notificationresource)

## EXAMPLES

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

New-RASNotificationResource -Type ConnectedSessionEvent -Threshold 22

Creates new resouce notification which notifies if the number of session\
exceeds 22.

## RELATED LINKS

* [Get-RASNotificationResource](get-rasnotificationresource)
* [Set-RASNotificationResource](set-rasnotificationresource)
* [Remove-RASNotificationResource](remove-rasnotificationresource)
