# Invoke-RASRetrieveAgentLogs

### NAME

Invoke-RASRetrieveAgentLogs\ <br>

### SYNOPSIS

Retrieves the Log files for one or more RAS Agents.\ <br>

### SYNTAX

Invoke-RASRetrieveAgentLogs \[-[InputObject](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Invoke-RASRetrieveAgentLogs.html#InputObject)] *<*[*RASAgentInfo\[\]*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/RASAgentInfo.html)*>* \[-[FilePath](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Invoke-RASRetrieveAgentLogs.html#FilePath) *\<string>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Invoke-RASRetrieveAgentLogs.html#CommonParameters)*>*]\
\
Invoke-RASRetrieveAgentLogs \[\[-[Server](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Invoke-RASRetrieveAgentLogs.html#Server)] *\<string>*] \[\[-[SiteId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Invoke-RASRetrieveAgentLogs.html#SiteId)] *\<uint>*] \[-[FilePath](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Invoke-RASRetrieveAgentLogs.html#FilePath) *\<string>*] \[-[ServerType](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Invoke-RASRetrieveAgentLogs.html#ServerType) {RDS | Provider | VDIHost | Gateway | Broker | PA | HALBDevice | All}] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Invoke-RASRetrieveAgentLogs.html#CommonParameters)*>*]\ <br>

### DESCRIPTION

Retrieves the Log files for one or more RAS Agents.\
\
For every RAS Agent log retrieved, a '.zip' file is generated. The output file path for every RAS Agent is returned.\ <br>

### PARAMETERS

\
-**FilePath \<string>**\
The path where the logs will be saved.\
\
FilePath is optional. If not supplied, the logs are saved in default Parallels RAS log folder.\
\
If any of these tags \[\<ServerName> | \<ServerType> | \<Timestamp>] are used in the filename, they will be replaced with a proper value.\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**ServerType <**[**RASLogSrvType**](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/RASLogSrvType.html)**>**\
Specifies the server type for which to retrieve the information.\
\
Possible values: RDS, Provider, VDIHost, Gateway, Broker, PA, HALBDevice, All\ <br>

```
        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.\ <br>

```
        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.\ <br>

```
        Required?                    false
```

```
        Position?                    1
```

```
        Default value                0
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**InputObject <**[**RASAgentInfo\[\]**](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/RASAgentInfo.html)**>**\
The RAS agent info.\
\
To obtain an RASAgentInfo object representing an RAS agent info list, use the Get-RASAgent command."\ <br>

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

<br>

### INPUTS

[RASAgentInfo\[\]](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/RASAgentInfo.html)

### OUTPUTS

[RASFiles](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/RASFiles.html)

### EXAMPLES

\
\&#xNAN;**---------- EXAMPLE 1 ----------**\
\
Invoke-RASRetrieveAgentLogs -Server MyRASserver\
\
Retrieves log files for the specified RAS server.\
\
The log files will be save in the default Parallels RAS log path.\
\&#xNAN;**---------- EXAMPLE 2 ----------**\
\
Invoke-RASRetrieveAgentLogs -ServerType RDS -FilePath "C:/temp/logs.zip"\
\
Retrieves log files for every RAS RDS Agent.\
\&#xNAN;**---------- EXAMPLE 3 ----------**\
\
Invoke-RASRetrieveAgentLogs -InputObject $RDSStatus -FilePath "C:/temp/"\
\
Retrieves log files for the specified RAS server.\
\
Log file names will be auto generated with this format: \<ServerName>\_\<ServerType>\_Logs\_\<Timestamp>.zip.
