Starts a BPA scan for a specific model that is installed on a computer.
PowerShell · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft BestPractices reference: Starts a BPA scan for a specific model that is installed on a computer. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Invoke-BpaModel. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / BestPractices · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-Authentication
Specifies the authentication mode to use when creating a remote connection for running a remote BPA scan. For more information, type Get-Help Invoke-Command.
-CertificateThumbprint
Specifies the certificate thumbprint to use when creating a remote connection via SSL for running a remote BPA scan. For more information, type Get-Help Invoke-Command.
-ComputerName
Specifies the target computer against which to run the BPA scan.
-ConfigurationName
Specifies the session configuration, such as the name of the endpoint, to use when creating a session for a remote BPA scan. For more information, type Get-Help Invoke-Command.
-Context
Scans a submodel in the context of a specific model (one that is different from the parent model of the submodel). For 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.
-Credential
Specifies the credentials to use when creating a remote connection for running a remote BPA scan. For more information, type Get-Help Invoke-Command.
-Mode
Specifies the mode to use when running the BPA scan. The acceptable values for this parameter are: All, Analysis, or Discovery.
-ModelId (required)
Identities the model to be used for the BPA scan.
-Port
Specifies the port to use when creating a remote connection for running a remote BPA scan. For more information, type Get-Help Invoke-Command.
-RepositoryPath
Specifies that the default location for reports specified by the ReportsRoot registry key should be overridden. This parameter specifies the path where the results should be stored.
-SubModelId
Identifies the submodel to run for the model specified by the *ModelId* parameter. For example, the Update Services model (Microsoft/Windows/UpdateServices) has two submodels (UpdateServices-DB, UpdateServices-Services).
-ThrottleLimit
Specifies the throttle limit to use when creating a remote connection for running a remote BPA scan. For more information, type Get-Help Invoke-Command.
-UseSsl
Specifies whether or not to use SSL when creating a remote connection for running a remote BPA scan. For more information, type Get-Help Invoke-Command.
Prerequisites
Windows with the BestPractices module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 1: Start a BPA scan for a specified model ID
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 either of the following cmdlets. Invoke-BPAModel -Id "ModelId1" OR Invoke-BPAModel "ModelId1" Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.