Thursday, 19 January 2023

Metered Connections and MECM complications

Introduction

While assisting a client with an important application update, a handful of devices failed to process the mandatory upgrade deployment.  An examination showed the cause of this to be a setting on the device's network connection - they were configured to be metered connections.

The Symptoms

In addition to the failed mandatory deployment, it was found that when a user opened Software Center all that appeared was a blank white screen of nothingness.




In addition the ccmmessaging.log file was full of outgoing expired messages.



The Problem

On closer investigation it was found that the Set as Metered connection setting, on the user’s Wi-Fi connection was set to On.  This was strange given that the connection was a broadband connection and the user had unlimited data download. 

This setting was found by going into Settings\Network & Internet\Wifi\Manage know networks.  After clicking on the on the Wi-Fi connection in use and then clicking on Properties, I could see that the Set as Metered connection setting was set to On



Clicking on Properties revealed the problematic setting.

The Workaround

It was found that switching the Set as metered connection setting to Off and rebooting the device fixed the issues. 

The Fix

These devices belonged to users who worked remotely. Keeping such devices as up to date as any on premise device was paramount, given the security related concerns about devices that are not being properly managed. It was therefore decided that even if a network connection has been set to metered - Microsoft Endpoint Configuration Manager should be configured to communicate with the device nevertheless

This was done by opening the CM console and navigating to Administration\Site Configuration Manager\Client Settings and then selecting Properties for the Default Client Settings object.  Metered Internet Connections is then selected in the left pane and Allow selected in the right pane next to Client communications on metered Internet connections. Finally clicking on OK to apply the new setting. 


Further Remediation

Clients already affected by this may never receive the new client settings policyTherefore, they may not be fixed by the new setting.  In order to remediate this a script was written that sets the Metered Connection setting to Off on every Wi-Fi connection.

Here is a working example of the script. 

#--------------------------------------------------------------------------------------

$c="" 

$e="" 

$connection="" 

$connection=netsh wlan show profiles 

foreach ($c in $connection){ 

#echo "---------------------"$c 

if ($c -ne ""){ 

#echo $c.substring(4,3) 

if (($c.substring(4,3) -eq 'All')){ 

$e=$c.substring(27,$c.length-27) 

#echo "start it" 

netsh wlan set profileparameter name=$e cost=unrestricted 

} 

} 

} 

$g=get-date 

echo $g >> c:\windows\TurnOffMeteredConnectionsIntune.txt 

#--------------------------------------------------------------------------------------

This script was configured to run via Intune. 


Conclusion

I hope you enjoyed reading this article and I hope that it assists you in using MECM to manage your systems.









4 comments:

Deploy Windows 11 with MDT - Supported

 Introduction The Microsoft Deployment Toolkit (MDT)  has been used by many companies for the provisioning of operating systems.  It does ha...