PowerShell v3 and Pre SP1 ConfigMgr Agent

Author by Rob Plank

This is kind of and old topic but with the number of page views that I still see on an old blog post I did about a year ago. I thought why not provide a solution for you to find this issue on your network. Here is a quick summary of the old post: If you Installed Windows Management Framework 3.0 (includes PowerShell v3) on a machine with a ConfigMgr 2012 Pre SP1 agent. The Health evaluation job that runs every night attempts to repair WMI. When the repair WMI repair job runs on a ConfigMgr Management Point it breaks the Management Point if WMF 3.0 is installed. To prevent the CcmEval job from breaking WMI you can set KLM\Software\Microsoft\CCM\CcmEval\NotifyOnly to True. Now, on to how you can setup a Configuration Item in ConfigMgr to find computers on your network with this issue. If you are already running ConfigMgr 2012 SP1 or later you don't have to worry about this, as your ConfigMgr client is compatible with PowerShell v3 and WMF 3.0. clip_image002 clip_image004 Script #Get CONFIGMGR Agent Version $result = $null $SMSAgent = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\sms\Mobile Client' $SMSAgentVersion = $SMSAgent.ProductVersion #Check if a Pre SP1 CONFIGMGR Agent is installed If ($SMSAgentVersion -le "5.00.7804.1000") { $result = "Not Compliant" } else { $result = $null } $result clip_image006 Click New clip_image007 Give your rule a name: PowerShell v3 should not be installed Click Add Script clip_image008 Script #Get PowerShell Version $PSVer = (get-host).Version.Major if ($PSVer -ge "3") { $result = "Not Compliant" } Else { $result = "Compliant" } $result clip_image009 clip_image010 You could also add a remediation script to this configuration item that edits the NotifiyOnly Registry Key if it is false. Set-ItemProperty HKLM:\SOFTWARE\Microsoft\CCM\CcmEval NotifyOnly "False" Once you have the Configuration item created you will need to add it to a Configuration baseline and deploy it to your network. Steps to repair your ConfigMgr Management Server 1. Uninstall WMF 3.0 2. Uninstall ConfigMgr Agent 3. Uninstall the MP role 4. Run ccmclean from the SMS 2003 toolkit 5. Reinstall the MP role and the ConfigMgr agent 6. Edit HKLM\Software\Microsoft\CCM\CcmEval\NotifyOnly to True (Make sure to do this before the CmmEval job runs) If you edit the NotifiyOnly value make sure you change it back to false once you have upgraded your agents to SP1 or later. I would strongly recommend you to upgrade to SP1 as soon as possible to support WMF 3.0 and full support for Win 8, Server 2012 and SQL 2012 and my favorite feature ConfigMgr PowerShell Cmdlets to name a few reasons.
Author

Rob Plank

Systems Engineer