Get-SMServerBpaResult

Get-SMServerBpaResult

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

Sintaxis

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

Descripción detallada

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.

Parámetros

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-BatchSize<UInt32>

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

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

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$'

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

true (ByPropertyName)

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

Ejemplos

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