Get-SMServerBpaResult

Get-SMServerBpaResult

The Get-SMServerBpaResult cmdlet retrieves the results of Best Practices Analyzer (BPA) scans.

構文

Parameter Set: GetServerBpaResult3
Get-SMServerBpaResult -BpaXPath <String[]> [-AsJob] [-BatchSize <UInt32> ] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

詳細説明

The Get-SMServerBpaResult cmdlet retrieves raw XML results of Best Practices Analyzer (BPA) scans on server roles, role services, or features, for one or more specified XPaths. To get BPA scan results, we recommend that you run the Get-BpaResult cmdlet instead of this cmdlet.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-BatchSize<UInt32>

Specifies the batch size, or number of result entries, that you want displayed in command results.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-BpaXPath<String[]>

Specifies one or more BPA XPaths where BPA scan results are available. Specify the BPA XPath in the the following format: BpaModelId:BpaFilepath:BpaXPath.

To get the names for BPA models that are installed on the target server, run the cmdlet Get-BpaModel. There is no file path available for results for a BPA model on a server until at least one set of scan results is available; that is, at least one scan has been run on the role or feature that is represented by the model. For best results, and to avoid errors, enclose the value of this parameter in single quotation marks. The following is a sample BpaXPath parameter value for results from a BPA scan on Hyper-V.

'Microsoft/Windows/Hyper-V:$reports$\*\Result.xml:/$ResultDatabase$/$Result$'

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

true (ByPropertyName)

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

Example 1: Get BPA scan results, as raw XML, for a scan on Hyper-V

This command gets the raw XML results of a BPA scan that was run on the Hyper-V role. Before you can run this command, run a BPA scan on the role, or verify that there are existing BPA scan results. For a better view of the command results, pipe the command to the Format-List cmdlet, another Format-* cmdlet, or to a file by using Out-File.

PS C:\> Get-SmServerBpaResult -BpaXPath 'Microsoft/Windows/Hyper-V:$reports$\*\Result.xml:/$ResultDatabase$/$Result$' | Format-List

Example 2: Get BPA scan results for File Services, and pipe them to a text file

This command gets the raw XML results of a BPA scan that was run on the File Services role, and pipes those results to a plain text file.

PS C:\> Get-SmServerBpaResult -BpaXPath 'Microsoft/Windows/FileServices:$reports$\*\Result.xml:/$ResultDatabase$/$Result$' | Format-List | Out-File -FilePath C:\Users\SashaD\Desktop\FSResults.txt