Get-BpaResult

Get-BpaResult

Retrieves and displays the results of the most recent Best Practices Analyzer (BPA) scan for a specific model.

Sintaxis

Parameter Set: ModelParameterSet
Get-BpaResult [-ModelId] <String> [[-CollectedConfiguration]] [-All] [-Filter <FilterOptions> ] [-RepositoryPath <String> ] [ <CommonParameters>]

Parameter Set: SubModelParameterSet
Get-BpaResult [-ModelId] <String> [[-CollectedConfiguration]] [-All] [-ComputerName <String[]> ] [-Context <String> ] [-Filter <FilterOptions> ] [-RepositoryPath <String> ] [-SubModelId <String> ] [ <CommonParameters>]

Descripción detallada

The Get-BpaResult cmdlet retrieves and displays the results of the latest Best Practices Analyzer (BPA) scan for a specific model that is installed on a computer. To use this cmdlet, add the ModelId parameter, and specify the model identifier (ID) for which to view the most recent BPA scan results. The All parameter can be used to retrieve all of the scanned results for a particular model. If the All parameter is not specified, then the most recent results of the particular model are returned.

This cmdlet can be used to view the results of a BPA scan for a specific model. An administrator specifies a model ID as a parameter and the latest results for that model are displayed.

Note: This cmdlet does not start a new BPA scan.

Parámetros

-All

Returns the output type Reports. This parameter can be used to retrieve all of the scanned results for a particular model. If this parameter is not specified, then the most recent results of the particular model are returned.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CollectedConfiguration

Returns only discovery information that was collected during a BPA scan, not the results of evaluating rules in the model.

Alias

ninguno

¿Requerido?

false

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ComputerName<String[]>

Specifies the target computer from which to retrieve BPA results.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Context<String>

Scans a submodel in the context of a specific model (one that is different from the parent model of the submodel). Example: an administrator wants to run a scan on the Backend submodel of the SQL model, but only those in the context of a third model, a technology that relies upon SQL Server.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Filter<FilterOptions>

Filters the type of result to return. Los valores aceptables para este parámetro son los siguientes: All, Compliant, or Noncompliant.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ModelId<String>

Identifies the model from which results need to be obtained.

Alias

Id,BestPracticesModelId

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue, ByPropertyName)

¿Aceptar caracteres comodín?

false

-RepositoryPath<String>

Specifies the location of the repository from which to get the results generated by the Invoke-BpaModel.
The Invoke-BpaModel cmdlet provides an option to store the results either in the default reports repository location contained in the ReportsRoot registry key or in the custom location supplied as the value of this parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-SubModelId<String>

Identifies the submodel for the model specified by the ModelId parameter.
Example: The Update Services model (Microsoft/Windows/UpdateServices) has two submodels (UpdateServices-DB, UpdateServices-Services).

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • System.String

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.BestPractices.CoreInterface.Report
  • Microsoft.BestPractices.CoreInterface.Result

Ejemplos

EXAMPLE 1

This example returns the most recent Best Practices Analyzer scan results for the model that is represented by ModelId1. The short form of the ModelId parameter can also be used, Id.

PS C:\> Get-BPAResult -ModelId ModelId1

EXAMPLE 2

This example, the Get-BpaModel cmdlet is used to return a list of all BPA models that are installed on the computer. The results of the Get-BpaModel cmdlet are piped to this cmdlet to retrieve the most recent Best Practices Analyzer scan results for all models that are supported by BPA.

PS C:\> Get-BPAModel | Get-BPAResult

Temas relacionados

Get-BpaModel

Invoke-BpaModel

Set-BpaResult