We've had this issue in a corporate environment across a range of customers, it's a regkey. Easy enough to fix: effectively, this registry key gets changed to '4' which disables WinHttpAutoProxySvc as a service, killing the wifi and making it not appear in the GUI. When you enable the network adapter, it turns off immediately - because the service can't run.
You can do this via the GUI as well, just open regedit and then go to HKLM:\SYSTEM\CurrentControlSet\Services\WinHttpAutoProxySvc where you ought to find 'Start' and change that to 3. Tactical restart, should do it.
$ServiceName = "WinHttpAutoProxySvc"
$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services$ServiceName"
$RegName = "Start"
$DesiredValue = 3
$LogFile = "C:\Tech\service_log.txt"
Function Write-Log {
param ([string]$Message)
$TimeStamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
"$TimeStamp - $Message" | Out-File -Append -FilePath $LogFile
}
Start logging
Write-Log "Script started."
Get the current registry value
$CurrentValue = Get-ItemProperty -Path $RegPath -Name $RegName -ErrorAction SilentlyContinue
if ($CurrentValue -and $CurrentValue.$RegName -ne $DesiredValue) {
Write-Log "Updating registry value from $($CurrentValue.$RegName) to $DesiredValue."
Set-ItemProperty -Path $RegPath -Name $RegName -Value $DesiredValue
Write-Log "Registry key updated successfully."
} elseif ($CurrentValue -and $CurrentValue.$RegName -eq $DesiredValue) {
Write-Log "Registry key is already set correctly ($DesiredValue)."
} else {
Write-Log "Registry key not found or inaccessible."
}
Get the current service status
$ServiceStatus = Get-Service -Name $ServiceName
if ($ServiceStatus.StartType -ne "Manual") {
Write-Log "Service is not set to autostart. Enabling it..."
Set-Service -Name WinHttpAutoProxySvc -StartupType Manual
Write-Log "Service enabled. A reboot may be required."
} else {
Write-Log "Service is already set to autostart."
}
Write-Log "Script execution completed."
Write-Host "Script completed. Log saved to $LogFile"
**
We logged a ticket with Microsoft and they said we had to open a paid-ticket, a good blog on this is as follows: https://www.windowslatest.com/2024/10/27/windows-11-24h2-issues-break-internet-wi-fi-network-sharing-cause-more-bsods/