# Get-LastRunDetails

## Synopsis

Gets the details of the last run or runs of specified management agent

## Syntax

```
Get-LastRunDetails  [-MA] <String> [[-Count] <Int32>] [<CommonParameters>]
```

## Description

Gets the first, or the specified number of run history items for the management agent, starting with the most recent item.

## Parameters

#### -MA \<string>

The management agent to get the run details from

|                             |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | 1     |
| Default value               |       |
| Accept pipeline input?      | false |
| Accept wildcard characters? | false |

#### -Count \<Int32>

The number of run history items to return (starting from the most recent). Leaving this value unspecified will return the last run history item

|                             |       |
| --------------------------- | ----- |
| Required?                   | false |
| Position?                   | 2     |
| Default value               | 1     |
| 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](http://go.microsoft.com/fwlink/?LinkID=113216).

## Examples

### Get the most recent run details

```
PS C:\> Get-LastRunDetails -MA ADMA
```

### Get the details of the last 5 runs

```
PS C:\> Get-LastRunDetails -MA ADMA -Count 5
```
