# encoding: ascii
# api: powershell
# title: BPA checks
# description: Get what Windows features are installed, check if there is a Best Practice for it available, run the BPA and filter results for anything that isn’t informational and dump it to text file
# version: 0.1
# author: PWilkinson
# license: CC0
# x-poshcode-id: 5261
# x-archived: 2016-04-15T18:57:53
# x-published: 2016-06-25T12:33:00
#
#
Get-WindowsFeature | where {$_.Installed -eq "Installed"} | where {$_.bestPracticesModelId -like "micro*"} | foreach { $_.BestPracticesModelId } | get-bpamodel | invoke-bpamodel
Get-WindowsFeature | where {$_.Installed -eq "Installed"} | where {$_.bestPracticesModelId -like "micro*"} | foreach { $_.BestPracticesModelId } | get-bpamodel | get-bparesult | Where { $_.Severity -ne "Information" } | out-file c:\BPA-All.txt -encoding ascii
