Close Menu
    Facebook X (Twitter) Instagram
    Sunday, October 12
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»CM2012»SCCM Configmgr CI to check server role or feature installed

    SCCM Configmgr CI to check server role or feature installed

    Eswar KonetiBy Eswar KonetiApril 04, 4:13 pm3 Mins Read CM2012 6,401 Views
    Share
    Facebook Twitter LinkedIn Reddit

    In this blog post, we will see how to use compliance item in configuration manager to check specific server role or feature installed on server or not .This request has come up to due to the fact that ,one of the engineer has enabled desktop experience feature on some of the servers which leads to install/enable flash player components in C:\windows\System32\Macromed\Flash folder. Qualys is is a provider of cloud security, compliance services which scan your network, servers, desktops or web apps for security vulnerabilities ,more at https://www.qualys.com/

    If you install desktop experience feature on server, it will try to install adobe flash components and create some files/folders in macromed

    Folder structure:

    image

    Adobe flash in control panel:

    image

    So ,Qualys scan based on the .dll file that are available on the server. If the version of .dll that is present on the server do not match with latest version of the product ,server will be flagged as vulnerable.

    During last couple of weeks ,it has come to my notice that ,some of the servers being detected as vulnerable for flash player but when i look into the server ,there is no flash related applications installed on the server (by looking at programs and features ).

    If there are no applications installed, there is no way for SCCM to detect the flash player components are installed and you cannot try to patch/update flash either using manual method /patching/software distribution.

    So there is need to identify how many servers are installed with desktop experience feature and remove this component if not needed.

    Using configmgr, we can use compliance item by passing simple script that will check for the desktop experience roles ,if installed output False as Non-compliant and if not installed, output as COMPLIANT.

    All you need is script to check for desktop experience feature ,if you are looking for other roles and features, feel free to modify it your needs.

    If you are looking for other roles and features, open the powershell cmd ,import servermanager module and run the following powershell cmd to list the windows roles/features on the server

    Get-WindowsFeature

    image

    Above listed are installed server roles and features .If you are looking for specific name ,pick it from the Name column to check for the installed status.

    In this blog post, am not going with remediation script .what it means is ,if the specific role/feature that you are looking is found ,run the remediation script like remove the role from the server to fix it.

    How to create configuration item/compliance baseline ?

    Follow my blog post to create Configuration item  http://eskonr.com/2016/08/sccm-configmgr-how-to-clean-ccmcache-content-older-than-x-days-using-compliance-settings/ , but just replace the discovery script with below powershell script (no remediation script is needed)

    Import-module servermanager
    $DE=(Get-WindowsFeature -name desktop-experience).Installed
    If ($DE -ne "Installed")
    {
    write-output "True"
    }
    else
    {
    write-output "False"
    }

    Compliance Rule:

    image

    Create Configuration baseline ,deploy to collection that you are interested to find the desktop experience feature installed or not.

    Hope it helps!

    Check Desktop Experince CI configmgr configuration baseline Configuration Item Powershell qualys for adobe flash SCCM
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    Export Microsoft Entra ID User Authentication Methods to CSV using PowerShell & Microsoft Graph API

    August 13, 2:08 pm

    SCCM SQL Report – Compare Installed Apps on TWO Different Computers

    July 13, 10:35 am

    Exporting Intune Win32 Apps with All Properties Using PowerShell and Microsoft Graph

    June 30, 7:01 pm

    7 Comments

    1. Tom on August 24, 2018 2:35 AM

      For some reason your script returns "True" if the Desktop Experience is installed and not installed.. :S

      SERVERA: Desktop Experience installed:

      PS C:\Windows\system32> Get-WindowsFeature -name desktop-experience

      Display Name Name Install State
      ------------ ---- -------------
      [X] Desktop Experience Desktop-Experience Installed

      Your script run:

      PS C:\temp> .\check.ps1
      True

      SERVERB: Desktop Experience NOT installed:

      PS C:\Users\tom.scott.adm> Get-WindowsFeature -name desktop-experience

      Display Name Name Install State
      ------------ ---- -------------
      [ ] Desktop Experience Desktop-Experience Available

      Your script run:

      PS C:\temp> .\check.ps1
      True

      Reply
      • Eswar Koneti on September 2, 2018 12:37 AM

        Hi Tom,
        thanks . I corrected it now . The only correction is -notlike replaced with -ne .

        Import-module servermanager
        $DE=(Get-WindowsFeature -name desktop-experience).Installed
        If ($DE -ne "Installed")
        {
        write-output "True"
        }
        else
        {
        write-output "False"
        }

        Thanks,
        Eswar

        Reply
    2. Ram on April 6, 2017 10:57 PM

      I changed client settings to ByPass for PS and the script error disappeared.

      Ram

      Reply
      • Eswar Koneti on April 7, 2017 10:04 PM

        Yes,that was the fix.

        Regards,
        Eswar

        Reply
    3. ramg1967 on April 5, 2017 9:01 PM

      Thanks Eswar. The script worked out fine. Just one Q - What does failure mean? I understand Non Compliant and Compliant. I have 2 system with failure and I looked at deployment details (script is not signed) error. Strange because the script ran successfully. Anyway I will troubleshoot more.

      Reply
    4. ramg1967 on April 4, 2017 7:05 PM

      What selection did you make for Setting Type and Data Type right below where you added the powershell script to Discovery script?

      Reply
      • Eswar Koneti on April 5, 2017 11:13 AM

        Hi,
        I just updated the blog post with link to refer previous blog post to create CI: http://eskonr.com/2016/08/sccm-configmgr-how-to-clean-ccmcache-content-older-than-x-days-using-compliance-settings/

        Please check now.

        Regards,
        Eswar

        Reply

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2025 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.