Invoke-BpaModel

Invoke-BpaModel

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

구문

Parameter Set: ModelParameterSet
Invoke-BpaModel [-ModelId] <String> [-Mode <ScanMode> ] [-RepositoryPath <String> ] [ <CommonParameters>]

Parameter Set: SubModelParameterSet
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>]

자세한 설명

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.

매개 변수

-Authentication<AuthenticationMechanism>

Specifies the authentication mode to use when creating a remote connection for running a remote BPA scan.
For more information, run the following cmdlet.
- Get-Help Invoke-Command

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-CertificateThumbprint<String>

Specifies the certificate thumbprint to use when creating a remote connection via SSL for running a remote BPA scan.
For more information, run the following cmdlet.
- Get-Help Invoke-Command

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ComputerName<String[]>

Specifies the target computer against which to run the BPA scan.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ConfigurationName<String>

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, run the following cmdlet.
- Get-Help Invoke-Command

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

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.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Credential<PSCredential>

Specifies the credentials to use when creating a remote connection for running a remote BPA scan.
For more information, run the following cmdlet.
- Get-Help Invoke-Command

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Mode<ScanMode>

Specifies the mode to use when running the BPA scan. 이 매개 변수에 허용되는 값은 다음과 같습니다. All, Analysis, or Discovery.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ModelId<String>

Identities the model to be used for the BPA scan.

별칭

Id,BestPracticesModelId

필수 여부

true

위치

2

기본값

없음

파이프라인 입력 적용 여부

True (ByValue, ByPropertyName)

와일드카드 문자 허용 여부

false

-Port<Int32>

Specifies the port to use when creating a remote connection for running a remote BPA scan.
For more information, run the following cmdlet.
- Get-Help Invoke-Command

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-RepositoryPath<String>

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.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-SubModelId<String>

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

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ThrottleLimit<Int32>

Specifies the throttle limit to use when creating a remote connection for running a remote BPA scan.
For more information, run the following cmdlet.
- Get-Help Invoke-Command

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-UseSsl

Specifies whether or not to use SSL when creating a remote connection for running a remote BPA scan.
For more information, run the following cmdlet.
- Get-Help Invoke-Command

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • System.String

    The input string specified by the ModelId parameter.

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • System.Collections.Generic.List<Microsoft.BestPractices.CoreInterface.InvokeBpaModelOutput>

    The output object encapsulates the results of the cmdlet that is entered. The output object contains information such as the BPA model ID, the success or failure of the cmdlet, and other details.

예제

EXAMPLE 1

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 ModelId1ModelId1
- OR -
Invoke-BPAModel ModelId1

PS C:\> Invoke-BPAModel -ModelId ModelId1

EXAMPLE 2

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.

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

EXAMPLE 3

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.

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

EXAMPLE 4

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

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

관련 항목

Get-BpaModel

Get-BpaResult

Set-BpaResult