.SYNOPSIS

Gets the Run History from the Sync Engine using WMI

.DESCRIPTION

The Get-MIISRunHistory function uses the Get-WmiObject cmdlet to query for MIISRunHistory in FIM Sync.
MSDN has good documentation for MIIS_RunHistory:
http://technet.microsoft.com/en-us/library/ms697834.aspx

PARAMETER RunNumber

The sequence number of the management agent run

PARAMETER RunProfile

The display name of the run profile used in this run

PARAMETER RunStatus

The status of the run

PARAMETER MAName

The name of the management agent that generated the run history

PARAMETER MAGuid

The GUID of the management agent that is associated with this run history

PARAMETER StartedBefore

Gets only the run history where the run profile started before the specified date and time. Enter a DateTime object, such as the one returned by the Get-Date cmdlet.
This input is converted to UTC!!!

PARAMETER StartedAfter

Gets only the run history where the run profile started after the specified date and time. Enter a DateTime object, such as the one returned by the Get-Date cmdlet.
This input is converted to UTC!!!

PARAMETER ComputerName

Specifies the ComputerName where FIMSync is running
(defaults to localhost)

.OUTPUTS

the MIIS_RunHistory returned by WMI

.EXAMPLE

Get all the run history on the server. This isn't as ugly as you'd think because the returned object doesn't contain ALL the run history XML.
Get-MIIS_RunHistory

.EXAMPLE

Get all the run history before a specific day.
Get-MIIS_RunHistory -StartedBefore (Get-Date '6/19') -Verbose

.EXAMPLE

Get all the run history starting before yesterday.
Get-MIIS_RunHistory -StartedBefore ([DateTime]::Now.AddDays(-1)) -Verbose

.EXAMPLE

Get all the run history for a specific MA.
Get-MIIS_RunHistory -MaName FIM -Verbose

.EXAMPLE

Get all the run history, then group by RunStatus. How many of YOUR runs are failing? You might not like the answer...
Get-MIIS_RunHistory | Group-Object RunStatus

Last edited Aug 14, 2012 at 4:10 AM by CraigMartin, version 1

Comments

No comments yet.