Get-BpaModel

Get-BpaModel

Retrieves and displays the list of BPA models installed on the system.

Syntax

Parameter Set: BPANoFilterParameterSet
Get-BpaModel [-RepositoryPath <String> ] [ <CommonParameters>]

Parameter Set: BPAFilterParameterSet
Get-BpaModel [-ModelId] <String[]> [[-SubModelId] <String> ] [-RepositoryPath <String> ] [ <CommonParameters>]

Detailed Description

The Get-BpaModel cmdlet retrieves and displays the list of models that are supported by Best Practices Analyzer (BPA) and installed on the computer.

If no parameter is specified, then this cmdlet returns all models that are installed on the computer. If a model is specified by using the ModelId parameter, then the specified model is returned.

Parameters

-ModelId<String[]>

Specifies the model ID of the Best Practices Analyzer model for displaying details. The short form of this parameter can also be used, Id.
This is the identity of the model whose details need to be obtained.

Aliases

Id

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

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 referred by the ReportsRoot registry key or in the custom location supplied as input to the Invoke-BpaModel cmdlet through this parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SubModelId<String>

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

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.String

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.BestPractices.CoreInterface.Model

Examples

EXAMPLE 1

This example can be used to return details about the BPA model that is specified in the ModelId parameter, represented by ModelID1. The short form of the ModelId parameter can also be used, Id.

PS C:\> Get-BPAModel

EXAMPLE 2

This example can be used to return details about BPA scans for all models that are installed on the computer.

PS C:\> Get-BPAModel

Get-BpaResult

Invoke-BpaModel

Set-BpaResult