SOLVED

how to remove a wifi profile off a device

Bronze Contributor

Hi all,

 

How do I remove a wifi profile off a device via intune? So its completely forgotten

 

 

10 Replies

If you add a group to the Exclude asssignment, it should be removed after the next device sync I think? Not tested myself, but I think it should work based on Troubleshoot device profiles in Microsoft Intune | Microsoft Docs)

Did that work out for you?
I have just set the test now I will let you know.
Hi Harm

This doesnt seem to have worked well I cant tell if its been deployed yet as I am unsure how to check the status of excluded groups for config profiles. I set it to exclude a group containing the test laptop like over an hour ago and the device has checked in with intune aswel several times. Is there a way via powershell to do this instead?
You could run a PowerShell script with this content, if you use the normal Scripts pane in Endpoint Manager it will only run once and remove the wireless profile you specify

netsh wlan delete profile name="SSID that you want to remove" i=*

Information:

C:\Users\HarmV> netsh wlan delete profile
One or more parameters for the command are not correct or missing.

Usage: delete profile [name=]<string> [[interface=]<string>]

Parameters:

Tag Value
name - Name of the profile to delete.
interface - Interface name.

Remarks:

Remove a wireless network profile from an interface or all interfaces.

Parameter name is required. It is the name of the profile to be deleted.
Parameter interface is optional. If it is given then the profile will
be deleted from specified interface only. If it is omitted then the
profile will be deleted from all the interfaces that have such a profile.

Profile name can have wildcard characters and multiple profiles with
matching name will be removed.

Examples:

delete profile name="Profile 1" interface="Wireless Network Connection"
delete profile name="Profile 1" i=*

Hi @Harm_Veenstra 

 

So would I need to create a script with:

netsh wlan delete profile name="Digital Support" interface="Wireless Network Connection"

 

Digital Support being the SSID

 

Correct, you can test it on your own machine first just by running the command-line, I would use "netsh wlan delete profile name="Digital Support" interface=* so that it gets deleted no matter what interface name the wireless adapter has.
perfect ill test and let you know thank you!

Hi @Harm_Veenstra 

 

Script works! Thank you! When using it via intune are all these no: 

 

Screenshot 2022-05-05 at 8.53.16 AM.png

best response confirmed by AB21805 (Bronze Contributor)
Solution
I think these options are correct, running it as system and no need for 64 bit since it's a netsh-thing :)
1 best response

Accepted Solutions
best response confirmed by AB21805 (Bronze Contributor)
Solution
I think these options are correct, running it as system and no need for 64 bit since it's a netsh-thing :)

View solution in original post