PoshCode Archive  Artifact [bfe81a828a]

Artifact bfe81a828aef43d637d3dc4272600ff027680ef7bc3f10b0cde68388018247b7:

  • File BPA-checks.ps1 — part of check-in [0e7121c828] at 2018-06-10 13:52:41 on branch trunk — 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. (user: PWilkinson size: 843)

# 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.
# version: 0.1
# author: PWilkinson
# license: CC0
# x-poshcode-id: 5260
# x-archived: 2014-08-29T22:09:31
# x-published: 2014-06-25T12:29: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:\onetouch\BPA-All.txt -encoding ascii