# Add-RASRule.md

## NAME

Add-RASRule

## SYNOPSIS

Adds a Rule to the Rule List.

## SYNTAX

**Add-RASRule** \[[Id](#id-string)] *(uint)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[ObjType](#objtype) {ClientPolicy | PubItem} -[RuleName](#rulename-string) *(string)* \[[Description](#description-string) *(string)*] \[[Enabled](#enabled-string) *(bool)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

**Add-RASRule** \[-[InputObject](#inputobject)] *(*[*RASListObj*](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/raslistobj)*)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[RuleName](#rulename-string) *(string)* \[[Description](#description-string) *(string)*] \[[Enabled](#enabled-string) *(bool)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

**Add-RASRule** \[[Name](#name-string)] *(string)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[ObjType](#objtype) {ClientPolicy | PubItem} -[RuleName](#rulename-string) *(string)* \[[Description](#description-string) *(string)*] \[[Enabled](#enabled-string) *(bool)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

## DESCRIPTION

Adds a Rule to the Rule List within Published Items.

## PARAMETERS

## Enabled (bool)

Whether the new rule will be enabled or disabled.

```
        Required?                    false

        Position?                    named

        Default value                True

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## RuleName (string)

The name of the rule to add to the Criteria.

```
        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Description (string)

Description for the new rule.

```
        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 Rule settings.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

Site ID for which to modify the Rule 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 Rule settings.

```
        Required?                    true

        Position?                    0

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## InputObject ([RASListObj](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/raslistobj))

An object of type ClientPolicy or PubItem for which to modify the Rule settings.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ObjType ([RuleObjType](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/ruleobjtype))

The Object Type for which to modify the Rule settings.

Possible values: ClientPolicy, PubItem

```
        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 ----------

Add-RASRule -Id 1 -ObjType ClientPolicy -RuleName Rule1

Add a rule with name Rule1 to the Rule List within the Client Policy with Id 1.

## RELATED LINKS

* [Get-RASRule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasrule)
* [Remove-RASRule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/remove-rasrule)
* [Set-RASRule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasrule)
