Tuesday, 26 February 2013

Running the Hyper-V BPA in Windows 2008r2 core mode

To run the Hyper-V 2.0 BPA in Windows 2008r2 core mode you need to run the following commands from the command line of the core mode installation.

c:\ocsetup ServerManager-PSH-Cmdlets /norestart

c:\ocsetup BestPractices-PSH-Cmdlets /norestart

Start PowerShell


PS C:\import-module ServerManager

PS C:\import-module BestPractices

PS C:\Invoke-BpaModel Microsoft/Windows/Hyper-V

PS C:\Get-BPAResult Microsoft/Windows/Hyper-v

If you want to export the results into a HTML page as a table, use this command instead

Get-BpaResult -BestPracticesModelId Microsoft/Windows/Hyper-V | Where-Object {$_.Severity -eq "Error" -or $_.Severity -eq “Warning” } | ConvertTo-Html -Property Severity,Category,Title,Problem,Impact,Resolution,Help -Title "BPA Report for Hyper-V" -Body "BPA Report for Hyper-V" –Head "" | Out-File "C:\bpa.html"