PoshCode Archive  Artifact [32bfc12477]

Artifact 32bfc12477bc0e1becf8d388d4100926f4abe7894e8436875ec6895aa9e03fb0:

  • File BPA-checks.ps1 — part of check-in [8dee4f411d] at 2018-06-10 13:52:42 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 and dump it to text file (user: PWilkinson size: 858)

# 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