# Set-RASAgentLogLevel

## NAME

Set-RASAgentLogLevel

## SYNOPSIS

Updates the Log Level of one or more RAS Agents.

## SYNTAX

**Set-RASAgentLogLevel** \[-[InputObject](#InputObject)] _<_[_RASAgentInfo\[\]_](../classes-and-enumerations/rasagentinfo)_>_ -[LogLevel](#LogLevel) {Standard | Extended | Verbose | None} \[-[DurationInSec](#DurationInSec) _\<uint>_] \[_<_[_CommonParameters_](#CommonParameters)_>_]

**Set-RASAgentLogLevel** \[\[-[Server](#Server)] _\<string>_] \[\[-[SiteId](#SiteId)] _\<uint>_] -[LogLevel](#LogLevel) {Standard | Extended | Verbose | None} \[-[DurationInSec](#DurationInSec) _\<uint>_] \[-[ServerType](#ServerType) {RDS | Provider | VDIHost | Gateway | Broker | PA | HALBDevice | EnrollmentServer | All}] \[_<_[_CommonParameters_](#CommonParameters)_>_]

## DESCRIPTION

Updates the Log Level of one or more RAS Agents.

## PARAMETERS

-**LogLevel <**[**RASLogLevel**](../classes-and-enumerations/rasloglevel)**>**\
The new Log Level value.

Possible values: Standard, Extended, Verbose, None

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**DurationInSec \<uint>**\
The duration before the log level is reset back to Standard level (in seconds).

Only applies for 'Extended' and 'Verbose' levels (Default: 43200 (12 hours), Max: 259200 (72 hours), Never: 0).

```
        Required?                    false

        Position?                    named

        Default value                43200

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**ServerType <**[**RASLogSrvType**](../classes-and-enumerations/raslogsrvtype)**>**\
Specifies the server type for which to retrieve the information.

Possible values: RDS, Provider, VDIHost, Gateway, Broker, PA, HALBDevice, EnrollmentServer, All

```
        Required?                    false

        Position?                    named

        Default value                All

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**Server \<string>**\
The name of the RAS agent server.

The name can be either FQDN or IP address, but you have to enter the actual name this server has in the RAS farm.

```
        Required?                    false

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**SiteId \<uint>**\
Site ID in which to modify the specified server.

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

```
        Required?                    false

        Position?                    1

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**InputObject <**[**RASAgentInfo\[\]**](../classes-and-enumerations/rasagentinfo)**>**\
The RAS agent info.

To obtain an RASAgentInfo object representing an RAS agent info list, use the Get-RASAgent command."

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       true (ByValue)

        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

[RASAgentInfo\[\]](../classes-and-enumerations/rasagentinfo)

## OUTPUTS

-none-

## EXAMPLES

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

Set-RASAgentLogLevel -ServerType RDS -LogLevel Extended

Modifies the log level for every RAS RDS Agent to 'Extended'.

NB. If -Duration is ommitted, a 12 hours duration is set by default.

After duration has passed, the LogLevel is automatically reset to Standard.\
&#xNAN;**---------- EXAMPLE 2 ----------**

Set-RASAgentLogLevel -Server MyRASserver -LogLevel Verbose -DurationInSec 43200

Modifies the log level for the specified RAS server to 'Verbose' for a duration of 12 hours.\
&#xNAN;**---------- EXAMPLE 3 ----------**

Set-RASAgentLogLevel -InputObject $RDSStatus -LogLevel Extended -DurationInSec 259200

Modifies the log level for the specified RDS RAS server to 'Extended' for maximum duration (72 hours).

## RELATED LINKS

* [Invoke-RASRetrieveAgentLogs](invoke-rasretrieveagentlogs)
* [Invoke-RASClearAgentLogs](invoke-rasclearagentlogs)
