Szukaj na tym blogu

wtorek, 21 kwietnia 2015

SCCM configuration baseline to check whether specific Windows feature is installed

You need to start from preparing script which will check whether specific Windows feature is installed. On Windows 7 dism tool must be used, on Windows 8 powershell cmdlet Get-WindowsOptionalFeature can be used. Below is a simple script based on dism for Windows Media Player feature:

$ff = dism /online /get-featureinfo /featurename:WindowsMediaPlayer | findstr State
If ($ff -eq "State : Enabled") {
$Compliance = "Compliant"
}
Else {
$Compliance = "NonCompliant"
}
Return $Compliance


To use this script in configuration item and then in configuration baseline the PowerShell execution policy must be changed from default All signed into Bypass. This is under Client Settings, under Computer Agent, there is an option to configure the PowerShell execution policy