Whenever I install a server, I run the Best Practice Analyzer (BPA) for all installed roles just to check if I haven’t messed up.
But when I did it this morning for a Hyper-V installation, I was actually wondering what the BPA checks for…
Since I wasn’t able to find a list in the GUI, I went to my favorite tool: PowerShell.
First, the BPA has to be run… else we’ll get an error since the list with the things it checks for hasn’t been generated yet and therefor PowerShell can’t get the information.
Then we import the module for the Best Practice Analyzer:
Next, we need to select the proper BPA results:
Now, this gives us a lot of information… most of which we don’t need in this case… we only want to get the names of the checks.
As you can see in the output of the previous command, there seems to be a property named ‘Title’. In my experience, the name given in the output is not always correct. Especially Active Directory is very good in confusing people that way… the name of a column in your output is not always the name of the actual property.
To get the available properties we can filter on, put ‘Get-Member’ behind the command in a pipe:
Get-BpaResult Microsoft/Windows/Hyper-V | Get-Member
Here you’ll see that there actually is a property called ‘Title’ which we can use.
So, to get a list of the names of all the checks the BPA performs for a Hyper-V installation:
Get-BpaResult Microsoft/Windows/Hyper-V | Format-Table Title
Note: You can simply replace ‘Hyper-V’ in ‘Microsoft/Windows/Hyper-V’ for whatever role you want to get the checks for…
The Hyper-V Virtual Machine Management Service should be configured to start automatically
The Hyper-V Networking Management Service should be configured to start automatically
The Hyper-V Image Management Service should be configured to start automatically
Hyper-V should be the only enabled role
The Server Core installation option is recommended for servers running Hyper-V
Domain membership is recommended for servers running Hyper-V
The number of logical processors in use must not exceed the supported maximum
The number of virtual processors in use must not exceed the supported maximum
More than one network adapter should be available
Reserve one or more external virtual networks for exclusive use by virtual machines
All virtual network adapters should be enabled
The number of virtual machines must be within supported limits
Use RAM that provides error correction
Configure the server with a sufficient amount of dynamic MAC addresses
Avoid pausing a virtual machine
Offer all available integration services to virtual machines
Enable all virtual network adapters configured for a virtual machine
Storage controllers should be enabled in virtual machines to provide access to attached storage
Display adapters should be enabled in virtual machines to provide video capabilities
Run the current version of integration services in all guest operating systems
Enable all integration services in virtual machines
Avoid using legacy network adapters when the guest operating system supports network adapters
Avoid using snapshots on a virtual machine that runs a server workload in a production environment
Dynamic virtual hard disks are not recommended for virtual machines that run server workloads in a production environment
Avoid using differencing disks on virtual machines that run server workloads in a production environment
Configure a virtual machine with a SCSI controller to be able to hot plug and hot unplug storage
Configure SCSI controllers only when supported by the guest operating system
Avoid configuring virtual machines to allow unfiltered SCSI commands