Intune Configuration Profiles, Remediation and Preferred Wi-Fi SSID

Maranya, Damon 316 Reputation points
2024-04-18T16:45:57.4633333+00:00

We are attempting to replace an existing wifi network that uses standard RADIUS. With a new network uses PSK without RADIUS for authentication. The goal is to get our fleet of Windows devices (mostly 10s, and a few 11s) to switch over to the new network automatically and keep it as the preferred network until the user selects a different network.

To this end, we are pushing a Wi-Fi profile using an Intune OMA-URI template device configuration profile. The wifi profile XML used in the config was exported from a device that was successfully connected to the network, and if the profile is imported to a new device. That device does successfully connect to the network with-out prompting for the PSK. But it does not automatically select the new network as preferred, so devices that have successfully applied the profile are still connecting to the old network first.

Since the script didn't appear to be setting the preferred network, I decided to try fixing it with Intune remediation. But the script it is running doesn't appear to be setting the new network as the preferred connection.

I get a trigger from the detection script like I would expect, but the remediation script doesn't appear to be doing what it is expected to do.

When I run the remediation script manually on a test device, the network priority is correctly set. But the device still connects to the old network.

We have also tried setting the priority using group policy. But that just broke the profile from Intune. Once the network was removed from the policy, devices receiving it would connect as expected.

Below I've included the detection and remediation scripts. Does anyone have any idea why my test devices would not be connecting to their preferred wif profile, or alternately a better/more elegant way to accomplish what we are trying to do?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,640 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
651 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,193 questions
Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,725 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,071 questions
0 comments No comments
{count} votes