Get-BpaResult

Get-BpaResult is accessible with the help of BestPractices module. To configure BestPractices, go through this link.

Synopsis

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

Description

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.

Parameters

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

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-CollectedConfiguration

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

Type:SwitchParameter
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ComputerName

Specifies the target computer from which to retrieve BPA results.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Context

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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Filter

Filters the type of result to return. The acceptable values for this parameter are: All, Compliant, or Noncompliant.

Type:FilterOptions
Accepted values:All, Compliant, Noncompliant
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ModelId

Identifies the model from which results need to be obtained.

Type:String
Aliases:Id, BestPracticesModelId
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

-RepositoryPath

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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-SubModelId

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

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Syntax

Get-BpaResult [-ModelId] <String> [-CollectedConfiguration] [-All] [-Filter <FilterOptions>] [-RepositoryPath <String>] [<CommonParameters>]

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

————–EXAMPLE 1————–
PS C:> Get-BPAResult -ModelId ModelId1
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.

————–EXAMPLE 2————–
PS C:> Get-BPAModel | Get-BPAResult
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.

You can check the Version, CommandType and Source of this cmdlet by giving below command.

Get-Command Get-BpaResult

Get-Command Get-BpaResult powershell script command cmdlet best practices bpa

You can also read about

To know more PowerShell cmdlets(Commands) on BestPractices click here

Click on this Link for an Single place where you get all the PowerShell cmdlet sorted based on the modules.

You can also refer other blogs on PowerShell at link

You can also refer other blogs on Microsoft at link

And also if you required any technology you want to learn, let us know below we will publish them in our site http://tossolution.com/

Like our page in Facebook and follow us for New technical information.

References are taken from Microsoft

One Reply to “Get-BpaResult”

Leave a Reply

Your email address will not be published. Required fields are marked *