Quick answer for advanced users: Open PowerShell as admin, run Get-NetConnectionProfile to find your network, then Set-NetConnectionProfile -InterfaceIndex X -NetworkCategory Private (replace X with your index number).
Why This Happens
You just moved your PC to a new room. Or you connected to a friend's home Wi-Fi. Now your network shows as public, and you can't change it. The drop-down menu in Settings is grayed out. It says "Public network" and won't budge.
This tripped me up the first time too. Windows 10 and Windows 11 both do this. The reason? Windows thinks your network is a guest or hotspot. It happens when you connect to a new network, or after a router reset, or if your network driver acts weird. The OS locks the profile to public for safety. But you need private for file sharing, printer access, or just to stop Windows from blocking things.
The good news: it's not a hardware issue. Your Wi-Fi card is fine. It's a software lock that needs a tiny push.
Fix Steps (The Main One That Works)
Skip the Settings app. It won't help here. The real fix is PowerShell. Follow these steps exactly. I've done this on Windows 10 version 22H2 and Windows 11 23H2. Works the same.
- Open PowerShell as admin. Click Start, type "PowerShell", right-click "Windows PowerShell", and pick "Run as administrator". If you see a pop-up asking for permission, click Yes.
- Find your network. Type
Get-NetConnectionProfileand press Enter. You'll see a list. Look for the one connected to the network you're on right now. The column "InterfaceAlias" shows your Wi-Fi name or Ethernet name. The column "NetworkCategory" shows "Public". Note the InterfaceIndex number (like 12 or 15). - Change it to private. Now type
Set-NetConnectionProfile -InterfaceIndex X -NetworkCategory Privatebut replace X with your number. For example:Set-NetConnectionProfile -InterfaceIndex 12 -NetworkCategory Private. Press Enter. No message appears—that's fine. - Check it worked. Run
Get-NetConnectionProfileagain. The NetworkCategory should now say "Private". That's it. Close PowerShell.
This change is instant. You don't need to restart. Your file sharing and network discovery should turn on automatically now. If they don't, go to Settings > Network & Internet > Wi-Fi or Ethernet, and toggle network discovery back on.
Alternative Fixes (If PowerShell Fails)
Sometimes PowerShell throws an error like "Access denied" or "Interface index not found". Don't panic. Here are other ways.
Use Registry Editor
This is for Windows 10 Pro or Enterprise, but I've seen it work on Home too. Be careful—registry changes can break things if you mess up.
- Press Windows+R, type
regedit, hit Enter. - Go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles. - You'll see folders with long GUID names (like {A1B2C3D4-...}). Click each one. On the right, look for "ProfileName". Find the one that matches your network SSID (Wi-Fi name) or network name.
- Once you find it, double-click "Category" on the right. Change the value: 0 for public, 1 for private, 2 for domain (don't use that unless on a corporate network). Set it to 1.
- Close regedit. Restart your PC. Check if it changed.
Reset Network Settings
This is a last resort for when nothing else works. It removes all saved Wi-Fi passwords and resets your network stack. Use only if you're stuck.
Go to Settings > Network & Internet > Advanced network settings > Network reset. Click "Reset now". Your PC will restart. After that, reconnect to your Wi-Fi and run the PowerShell steps again.
Prevention Tip
To stop this from happening again, check one thing. After you set your network to private, go to Settings > Network & Internet > Wi-Fi > Manage known networks. Find your network and click "Properties". Under "Network profile type", make sure it says "Private". Windows should remember this for next time. But if your router gets a firmware update or you change the SSID, it might reset. If that happens, just run the PowerShell command again. Takes 30 seconds.
Also, keep your network driver updated. Old drivers sometimes cause the profile to flip back to public. Go to your PC manufacturer's site (like Dell, HP, Lenovo) and download the latest Wi-Fi driver for your model. Don't use Windows Update for this—it often gives you a generic driver that's not optimized.