PowerShell Logo Small

Invoke-BpaModel



This is the built-in help made by Microsoft for the command 'Invoke-BpaModel', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Starts a Best Practices Analyzer (BPA) scan for a specific model that is installed on a computer.

SYNTAX


Invoke-BpaModel [-ModelId] <String> [-Mode <ScanMode>] [-RepositoryPath <String>] [<CommonParameters>]
Invoke-BpaModel [-ModelId] <String> [-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [-ComputerName <String[]>] [-ConfigurationName <String>]
[-Context <String>] [-Credential <PSCredential>] [-Mode <ScanMode>] [-Port <Int32>] [-RepositoryPath <String>] [-SubModelId <String>] [-ThrottleLimit <Int32>] [-UseSsl]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Invoke-BpaModel cmdlet starts a Best Practices Analyzer (BPA) scan for a specific model that is installed on a Windows-based computer. The model is specified either by
using the ModelId parameter, or by piping the results of the Get-BpaModel cmdlet into this cmdlet. If a model is specified in the cmdlet after the BPA scan has been
performed, then the results of the scan are available as an XML file.


This cmdlet cannot be canceled after it has been started.


Single-node XML is not supported by the BPA model schema. For more information about what is supported by the BPA model schema, see the Microsoft Baseline Configuration
Analyzer Model Authoring Guide on the Microsoft Download Center.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?LinkId=287255
Get-BpaModel
Get-BpaResult
Set-BpaResult

REMARKS

<

Examples


EXAMPLE 1

PS C:\>Invoke-BPAModel -ModelId ModelId1



This example starts a BPA scan on the model that is represented by ModelId1.

The same task can be completed by running any of the following cmdlets.
Invoke-BPAModel -ModelId ModelId1

- OR -
Invoke-BPAModel -Id ModelId1

- OR -
Invoke-BPAModel ModelId1




EXAMPLE 2

PS C:\>Invoke-BPAModel –ModelId ModelId1 -ArgumentTable @{context=domain; name=contoso.com;}



This example starts a BPA scan on the specified model ID. The ArgumentTable parameter helps the administrator start a BPA scan with additional model-specific instructions.
In this example, the values of additional and required model parameters are specified by using the ArgumentTable parameter. The scan is focused only on those parts of the
model that occur in the contoso.com domain.




EXAMPLE 3

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



This example gets all BPA models that are installed on the computer, and then pipes the results of the Get-BPAModel cmdlet to this cmdlet to start a BPA scan on all models.




EXAMPLE 4

PS C:\>$BPAObj = Invoke-BPAModel ModelId1


This cmdlet displays the results of any specific object in the previous cmdlet by calling the variable into which the results of the previous cmdlet were saved, and then
specifying the object in the results that the administrator wants. The object is identified by its numerical order in the collection of results (the 0, or first, object).
The cmdlet then identifies which field of the results in that object (for this example, the Detail field) the administrator wants to view. The cmdlet shown returns the
properties of the Detail field from the first object in the results of the preceding line.
PS C:\>$BPAObj[0].Detail
ModelId : ModelId1
Success : True
ScanTime : 10/21/2008 3:08:47 PM
InformationMessages : 5
WarningMessages : 4
ErrorMessages : 0
Description :



This example starts a BPA scan on the model specified by ModelId1, and saves the results of the cmdlet as a variable, BPAObj.