# Get-RASRule.md

## NAME

Get-RASRule

## SYNOPSIS

Retrieves the Rule settings.

## SYNTAX

**Get-RASRule** \[[Id](#id-string)] *(uint)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[ObjType](#objtype) {ClientPolicy | PubItem} \[[RuleId](#ruleid-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

**Get-RASRule** \[[Name](#name-string)] *(string)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[ObjType](#objtype) {ClientPolicy | PubItem} \[[RuleId](#ruleid-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

## DESCRIPTION

Retrieves the Rule settings from Published Items.

## PARAMETERS

## Name (string)

The name or server for which to retrieve the Rule settings.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

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

```
        Required?                    true

        Position?                    0

        Default value                0

        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 retrieve the Rule settings.

Possible values: ClientPolicy, PubItem

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## RuleId (uint)

The ID of the Rule to retrieve.

```
        Required?                    false

        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

[ClientPolicyRule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/clientpolicyrule)

[PubItemRule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/pubitemrule)

## EXAMPLES

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

Get-RASRule -Id 1 -ObjType ClientPolicy

Retrieves the Rule Settings of the Client Policy with Id 1.\
\*\*---------- EXAMPLE 2 ----------

Get-RASRule -Id 1 -ObjType ClientPolicy -RuleId 2

Retrieves the Rule with Id 2 from the Client Policy with Id 1.

## RELATED LINKS

* [Add-RASRule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/add-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)
