# Invoke-RASClearAgentLogs

## NAME

Invoke-RASClearAgentLogs

## SYNOPSIS

Removes the Log file of one or more RAS Agents.

## SYNTAX

**Invoke-RASClearAgentLogs** \[-[InputObject](#InputObject)] _<_[_RASAgentInfo\[\]_](../classes-and-enumerations/rasagentinfo)_>_ \[_<_[_CommonParameters_](#CommonParameters)_>_]

**Invoke-RASClearAgentLogs** \[\[-[Server](#Server)] _\<string>_] \[\[-[SiteId](#SiteId)] _\<uint>_] \[-[ServerType](#ServerType) {RDS | Provider | VDIHost | Gateway | Broker | PA | HALBDevice | EnrollmentServer | All}] \[_<_[_CommonParameters_](#CommonParameters)_>_]

## DESCRIPTION

Removes the Log file of one or more RAS Agents.

## PARAMETERS

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

Invoke-RASClearAgentLogs -ServerType RDS

Clears the log files for every RAS RDS Agent.\
&#xNAN;**---------- EXAMPLE 2 ----------**

Invoke-RASClearAgentLogs -Server MyRASserver

Clears the log files for the specified RAS server.\
&#xNAN;**---------- EXAMPLE 3 ----------**

Invoke-RASClearAgentLogs -InputObject $RDSStatus

Clears the log files for the specified RAS server.

## RELATED LINKS

* [Invoke-RASRetrieveAgentLogs](invoke-rasretrieveagentlogs)
* [Set-RASAgentLogLevel](set-rasagentloglevel)
