当您在Windows 10(Windows 10)中连接到新的未知网络时,操作系统(operating system)会将其设置为Public。这意味着Windows 10提供了对同一网络上其他设备的最大保护,因为它将该网络视为不受信任。因此,您的Windows 10电脑无法在网络上被发现,并且您无法与该网络共享文件夹和打印机。但是,您可能希望将网络设置为Private。以下是在Windows 10中更改(Windows 10)网络配置文件(network profile)的最快方法:
重要提示:(IMPORTANT:)要使该过程生效,您必须使用具有管理员权限的用户帐户登录。(user account)如果您需要复习Windows中(Windows)网络位置(network location)的用途,请阅读本指南:Windows 中的网络(Windows)位置(network location)是什么?在Windows 10中更改网络位置(network location)的过程会根据您连接到网络的方式略有不同:无线或通过以太网电缆(Ethernet cable)。在本指南中,我们涵盖了这两种情况,每种情况都在单独的部分中。
连接到 WiFi 时如何将Windows 10 网络位置更改为私有(network location)
如果您使用装有Windows 10的笔记本电脑、(Windows 10)平板电脑或 Surface Pro 设备(tablet or Surface Pro device),并且您已连接到无线网络(wireless network),请首先单击或点击任务栏(click or tap)通知区域(notification area)中的WiFi 图标(WiFi icon)(通常位于屏幕)。然后,单击或点击(click or tap)您所连接的WiFi 网络(WiFi network)名称下方的属性链接。(Properties)
将打开一个设置(Settings)窗口,其中包含您所连接的无线网络的设置。(wireless network)在“网络配置文件”(Network profile")部分,单击或点按专用(Private),网络位置(network location)将更改。
或者,如果您想将网络位置(network location)从Private更改为Public,请做出相反的选择。现在您可以关闭“设置”(Settings)窗口。Windows 10立即应用和使用更改。
通过网线(network cable)连接时如何将Windows 10 网络位置更改为私有(network location)
如果您使用的是装有Windows 10且使用以太网电缆(Ethernet cable)连接到网络的台式电脑,则过程会有所不同。首先(First),单击任务栏通知区域(notification area)中的网络图标(network icon)(通常位于屏幕右下角)。然后,单击您连接到的网络的名称。
将显示“设置”(Settings)窗口,其中包含以太网网络(Ethernet network)连接的设置。再次单击(Click)网络名称。
显示一个设置列表,用于您的活动网络连接(network connection)。在“网络配置文件”(Network profile")部分,单击或点按专用(Private),网络位置(network location)将更改。或者,如果您想将网络位置(network location)从Private更改为Public,请做出相反的选择。
关闭设置(Settings)窗口,您就完成了。Windows 10立即应用和使用更改。
如何使用“设置”应用更改(Settings app)Windows 10 网络位置(network location)
以上方法是最快的。但是,还有另一种方法可以使用“设置”(Settings)应用程序进行相同的更改。在Windows 10中,打开设置(Settings)并转到“网络和 Internet”。("Network & Internet.")然后,如果您使用 Wi-Fi 网络,请转到Wi-Fi,单击或点击您连接的网络的名称,然后根据您的需要将网络配置文件(network profile)更改为Private或Public 。
如果您使用以太网连接(Ethernet connection),请转到以太网(Ethernet)并单击您所连接的网络的名称。然后,更改网络配置文件(network profile)。
如何使用命令提示符或 PowerShell更改(Command Prompt or PowerShell)Windows 10 网络位置(network location)
如果您喜欢命令行,您可以运行命令提示符(Command Prompt)或以管理员身份启动PowerShell 。然后键入命令Get-NetConnectionProfile并按Enter。然后显示有关活动网络连接(network connection)的信息。查看名称(Name)字段并记住它的值。这是Windows为您的网络连接(network connection)起的名称。此外,在NetworkCategory字段中,您会看到为(NetworkCategory)网络连接(network connection)设置的当前网络位置(network location)。接下来,键入命令:Set-NetConnectionProfile -Name "NetworkName" -NetworkCategory Private. 将NetworkName替换为上一个命令共享的Name字段的值。
如果要将网络位置(network location)设置为Public,请键入Set-NetConnectionProfile -Name "NetworkName" -NetworkCategory Public,并将NetworkName替换为上一个命令共享的Name字段的值。
要仔细检查网络位置(network location)是否已更改,请再次运行Get-NetConnectionProfile并查看结果。NetworkCategory字段应具有不同的值。
注意:(NOTE:)有关使用Get-NetConnectionProfile命令的更多信息,请在此处查看(here)Microsoft创建的文档。
为什么设置正确的Windows 10 网络配置文件很重要(network profile matter)?
Windows 10根据为其设置的位置处理您的网络连接。(network connection)公共(Public)网络被认为是不可信的。当连接到您不知道的网络时,您应该将网络连接设置为公共(Public),例如公共场所、机场、酒店、餐馆、图书馆或您不工作的公司的网络。仅当您认识并信任它们时,您才应将网络设置为私有,就像您(Private)家中或工作场所(home or workplace)中的网络一样。当您将网络设置为Private时,Windows 10 允许在网络上发现您的计算机或设备(computer or device),以共享数据和设备,包括打印机。例如,您不能安装无线打印机(wireless printer)或网络打印机(network printer),除非网络连接(network connection)设置为专用(Private)。
您(Did)是否成功更改了Windows 10中的(Windows 10)网络配置文件(network profile)?
如果您按照上述步骤操作,您可以快速将Windows 10 网络位置(network location)从“私有(Private)”更改为“公共”(Public)或反之。在结束本教程之前,请告诉我们一切是否适合您。如果您在更改网络配置文件(network profile)时遇到问题,请在下面的评论中告诉我们发生了什么。
How to change the Windows network profile to Private (or Public)
When you connect to a new and unknown network in Windows 10 or Windows 11, the oрerating system sets it as Public which means it doesn’t consider it trustworthy. When the network profile is set to Public, your computer or device is not discoverable on the network, and you cannot share stuff with others. However, you may want to set the network as Private because you’re on a network you trust and want to share content or hardware. Here’s how to change the network profile to Private:
Why should you change the network profile in Windows?
Both Windows 10 and Windows 11 treat your existing network connection based on the profile set for it. When you connect to a new network, Windows automatically sets it as Public, meaning it might not be a safe network. This network profile is a great choice when you’re connected to networks that you do not know, like those found in public places, airports, hotels, restaurants, libraries, or companies you do not work for. The only networks you should set as Private are the ones you know and trust, like those in your home or workplace. When you set a network as Private, Windows allows your computer or device to be discoverable on the network, to share files, folders, and devices, including printers. For example, you cannot install a wireless or network printer at home unless the network profile is set as Private.
How to change the Windows 10 network profile from Public to Private or the other way around
At the time this article is written, most people are still using Windows 10, so I’ll start with this operating system. Also, I’ll first cover laptop and tablet users with Wi-Fi connections and then desktop users with Ethernet connections.
How to change the network profile to Private (or Public) when connected to WiFi
To change the network profile for your Wi-Fi connection, click or tap the Wi-Fi icon found in the bottom-right corner of the desktop and then the Properties link under the network you’re connected to.
Open the list of Wi-Fi networks and choose Properties
This takes you to a Settings page, where you see details about the wireless network you’re using. In the Network profile section, choose between Public or Private, depending on what you want.
Set the network profile in Windows 10
Your setting is applied immediately. You don’t need to press a Save button or restart your device.
Another way to get to the same place is to open Settings and go to Network -> Internet. On the left, choose WiFi, and on the right, click or tap on your network’s name.
Access the properties of your Wi-Fi connection
In the Network profile section, choose between Public or Private, as shown earlier.
How to change the network profile to Private (or Public) when using an Ethernet connection
If you’re on a desktop computer, open Settings (Windows + I). Then, go to the Network & Internet section. In the column on the left, choose Ethernet, and on the right, click on the network’s name.
Access the properties of your Ethernet connection
You see the properties of your Ethernet connection. Then, in the Network profile section, choose Private or Public, depending on what you want.
Set the network profile in Windows 10
Your setting is instantly applied.
How to change the Windows 11 network profile from Public to Private or the other way around
First, let’s see how to change the network location for Wi-Fi connections in Windows 11 and then for Ethernet connections. Each type of network connection has its separate section below.
How to change the network profile to Private (or Public) when connected to WiFi
Let’s assume that you’ve just connected to a new wireless network on your Windows 11 laptop or tablet. As soon as you’re connected, the network’s name is shown at the top of the list of Wi-Fi networks, together with its status: “Connected, secured.” Click or tap the i (Properties) button next to your network.
Access the properties of your Wi-Fi connection
This action takes you to the Properties window for your Wi-Fi network. In the “Network profile type” section, choose Private instead of Public (Recommended). Your setting is applied immediately.
Change the Network profile type
An alternative is to open Settings and go to Network & internet. Then, on the right, click or tap on the Wi-Fi section. Don’t press the switch for Wi-Fi, as it enables or disables wireless connectivity. Instead, click or tap ONLY on the name of the section.
Choose Wi-Fi in the Network & internet settings
You then see all the Wi-Fi settings that can be configured in Windows 11. Click or tap on your network’s name followed by the word properties, shown below the Wi-Fi switch.
Access the properties of your Wi-Fi connection
Then, choose between Private or Public for the Network profile type.
Change the Network profile type
Your Wi-Fi network is now set as you wish.
How to change the network profile to Private (or Public) when using an Ethernet connection
You may be using a desktop PC connected to the network through a cable instead of Wi-Fi. If that’s the case for you, open Settings (Windows + I). Then, click Network & internet on the left, and then, on the right, go to Ethernet.
Access the properties of your Ethernet connection
You see all the properties of your Ethernet connection. In the “Network profile type” section, choose Private instead of Public (Recommended).
Change the Network profile type
NOTE: You should choose Public when you don’t want your PC to be discoverable on the network.
How to change the network profile using CMD, PowerShell, or Windows Terminal
If you prefer command-line environments, open the Command Prompt, PowerShell, or Windows Terminal as administrator, depending on which you like most. I prefer to open Windows Terminal because it looks better than the other two. First, you need to know the network's name as it is stored by Windows. To do that, run the following command and press Enter:
You see the name of the existing network connection (it doesn’t matter if it's wireless or wired) and its current profile in the NetworkCategory field highlighted below.
See the Name and NetworkCategory fields
Remember the network's name exactly as you see it listed by the command you’ve just run. Then, type this command and press Enter:
Don’t forget to replace NetworkName with the value of the Name field shared by the previous command.
Change the network profile
The network name is changed immediately, but you don't get any confirmation message.
If you want to change the network profile from Private to Public, write this command instead:
Again, don’t forget to replace NetworkName with the Name field value returned by the first command you’ve run.
TIP: To double-check that the network location was changed, rerun the first command and see the results. The NetworkCategory field should have a different value.
How to change the network profile using Local Group Policy Editor
If you’re using the Pro or Enterprise editions of Windows 10 and Windows 11, you can also change the network profile using Local Group Policy Editor. First, use any of the methods described in this guide to open the Local Group Policy Editor. Then, on the left side of the window, navigate to “Computer Configuration > Windows Settings > Security Settings > Network List Manager Policies.” On the right, double-click on your network’s name.
Access the properties of your network connection
You see the properties of your network connection. Go to the Network Location tab, choose the Location type you want (Private or Public), and click OK.
Change the Location type
Your setting is applied, and all you have to do is close the Local Group Policy Editor.
TIP: Did you know there are eight ways to close apps in Windows?
Why can’t I change the network profile?
Your network profile settings might be missing from Windows 10 or Windows 11. If that’s the case for you, you most probably use a company computer, and this setting is configured ONLY by your network administrator, using policies approved by the management. However, it may happen that you’re using a personal computer that’s not connected to a company domain, and you still can’t change the network profile from Public to Private or the other way around. If this happens, you should reset your network adapter(s). Then, the next time you connect your computer to a network, you should be able to change the network profile using the instructions shared in this guide.
Did you successfully change the network profile?
As you have seen in this guide, it’s not that difficult to change the network profile set by Windows. All it takes are a few clicks or two commands. Before closing this tutorial, tell me if everything worked well for you. If you had trouble changing the network profile, share what happened in a comment below.