Windows server 2012 change network profile

Как изменить тип сети с общедоступной на частную в Windows 10 / Server 2016/2012 R2?

В этой статье мы рассмотрим понятие профиля сети в Windows, рассмотрим какие типы профилей сети бывают, для чего используются и как изменить назначенный профиль сети с “общедоступной” на “частную” или наоборот в Windows 10/Windows Server 2019/2016. Это бывает нужно, если сеть неправильно определяется как общественная (Public Network), когда должен быть определена как частная (Private).

Сетевые профили Windows являются частью брандмауэра Windows и позволяют применять различные правила брандмауэра в зависимости от типа сети, к которой подключен компьютер. В зависимости от примененного профиля для вашего сетевого подключения, другие компьютеры могут видеть или не видеть ваш компьютер в сети (настройки сетевого обнаружения), использовать расшаренные папки и сетевые принтеры.

Типы (профили) сети в Windows

Профили сети появились еще в Vista/Windows Server 2008. В Windows 10 (Windows Server 2016) сетевому интерфейсу (будь то Ethernet или Wi-Fi) можно присвоить один из трех сетевых профилей.

  • Частная или домашняя сеть (Private) – профиль для доверенной сети (домашняя или рабочая сеть в офисе). В такой сети компьютер будет доступен для обнаружения другими устройствами, на нем можно использовать службы общего доступа к сетевым файлам и принтерам;
  • Общедоступная (общественная) сеть (Public) – профиль для недоверенной сети (кафе, публичная Wi-Fi сеть в метро, аэропорту). Вы не доверяете другим устройствам в такой сети, ваш компьютер будет скрыт для других устройств, нельзя получить удаленный доступ к опубликованным у вас сетевым папкам и принтерам;
  • Доменная сеть (Domain) – сетевой профиль для компьютеров, состоящих в домене Active Directory. Применяется автоматически после добавления Windows в домен. Для этого профиля вы можете применять доменные политики брандмауэра.

Как уже говрилось ранее, на основании профиля сети, примененного к сетевому интерфейсу, к нему применяются разные правила брандмауэра Windows.

В Windows 10 вы можете проверить текущий профиль, который назначен сетевому подключению в меню Settings -> Network and Internet. На моем скриншоте видно, что сетевому интерфейсу Ethernet0 присвоен профиль Public.

В классической панели управления тип сети для активных сетевых подключения отображается здесь: Control Panel\All Control Panel Items\Network and Sharing Center.

Но изменить тип назначенного профиля сети из классической панели управления нельзя. Например, в Windows Server 2012 R2/ Windows 8.1 изменить профиль сети можно только через PowerShell, реестр или локальную политику безопасности.

Читайте также:  Лабораторная работа операционная система microsoft windows

Как присваивается профиль для сети в Windows 10?

Профиль сети в Windows 10 выбирается пользователем при первом подключении к новой сети. Появляется запрос:

Если выбрать “Да”, сети присваивается профиль Private (домашняя), если “Нет” – public (общедоступная). При следующем подключении к этой же самой LAN или WiFi сети автоматически назначается выбранный ранее профиль.

В Windows 10 вы можете сбросить все настройки и профили для всех сохраненных сетей, выбрав Параметры -> Сеть и Интернет -> Состояние -> Сброс сети. Перезагрузите компьютер.

Теперь при подключении к сети опять появится запрос о включении сетевого обнаружения.

Как в Windows 10 изменить профиль сетевого подключения?

Вы можете изменить тип сети из графического интерфейса Windows 10. Если вы используете новую панель Параметры, перейдите в раздел «Сеть и Интернет» -> «Состояние» -> «Изменить свойства подключения» (Change connection properties).

Здесь можно переключить применяемый сетевой профиль с Public на Private и наоборот.

Из классической Панели Управления Windows 10 изменить тип сетевого профиля интерфейса нельзя.

Также вы не можете сменить профиль на компьютере в домене, для сетевого подключения к домену всегда будет использоваться профиль Domain.

Изменить профиль сети с Public на Private в Windows 10 через PowerShell

В Windows 10 / Windows Server 2016/2019 вы можете управлять профилями сетевых подключений из PowerShell. Запустите консоль PowerShell с правами администартора.

Теперь с помощью командлета Get-NetConnectionProfile получим список сетевых интерфейсов и применённые к ним профили сети.

В моем примере на компьютере имеется 4 сетевых подключения, с разными типами профилей сети (NetworkCategory: Public, Private и DomainAuthenticated.

Попробуем изменить профиль сети для одного сетевого подключения. В этом случае нас интересует индекс, назначенный данной сетевой карте. В этом примере InterfaceIndex = 19.

Зная индекс сетевого интерфейса, можно изменить тип сети на Private:

Set-NetConnectionProfile -InterfaceIndex 19 -NetworkCategory Private

Проверим, что профиль сети изменился:

Get-NetConnectionProfile -InterfaceIndex 19

Новые правила брандмауэра будут применены к интерфейсу в соответствии с назначенным профилем без перезагрузки.

Также вы можете изменить профиль сети сразу для всех сетевых адаптеров компьютера:

Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private

Изменить тип сети в Windows 10 через редактор реестра

Вы можете изменить тип сети через редактора реестра. Для этого нужно запустить regedit.exe и перейти в раздел HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles, в котором хранятся профили всех сетевых подключений.

Найти нужный профиль сети можно по имени в Центре управления сетями. Имя сети указано в ключе реестра ProfileName. Тип сети задается в параметре Category. Доступны следующие значения этого ключа:

  • 0 — Общественная сеть (Public Network)
  • 1 — Частная сеть (Private Network)
  • 2 — Доменная сеть (Domain Network)

Измените значение ключа на нужный и перезагрузите компьютер.

Сменить профиль сети через политику безопасности

Еще один способ смены типа сети — редактор локальной политики безопасности (Local Security Policy).

Clint Boessen’s Blog

Lots of Hints, Tips and Tricks for IT Professionals.

Читайте также:  Windows storage server vmware

Avantgarde Technologies

Tuesday, November 26, 2013

How to Change your Network Profile in Server 2012

Network Profiles were first introduced as part of Windows Firewall with Advanced Features in Vista/2008 to allow administrators to configure different firewall profiles based upon what network a user connects to. Administrators could change the profile by navigating to Network and Sharing Center in control panel and selecting the profile which suits their needs.

In Server 2012, Administrators can no longer change the network profile in Network and Sharing Center, they can view just not change.

To change the network profile you must use the new PowerShell cmdlets introduced in PowerShell version 4 in Windows Server 2012.

Please refer to the following screenshots for performing this procedure.

After making this change, it will update in Network and Sharing Center.

The default profile in Windows Server 2012 is public. This changes automatically when you join the server to the domain however in the event your server is not to be joined to the domain, you need to change the profile manually yourself. In this instance I’m setting up a stand alone offline certificate authority which must not be domain joined. As a result I needed to configure this manually.

How to Change Network Profiles with PowerShell?

Sometime it’s not possible to change network profiles using graphical interface. The network profiles or network categories are Private network, Public Network, and Domain Network. This is how to change network profile using PowerShell.

Change Network Profile Using PowerShell

It’s another PowerShell articles related to network configuration with PowerShell. It’s using PowerShell to manage network adapters with PowerShell. So try to read the preview PowerShell articles also.

The three network profiles in Windows 10 are:

  • Private: Computers on a private network can belong to a home group. Network discovery is turned on for private networks, which allows you to see other computers and devices on the network.
  • Public: Designed to keep your computer from being visible to other computers around you and to help protect your computer from any malicious software from the Internet.
  • Domain: It belongs to enterprise network. It’s controlled by network admin and can’t be selected and changed locally.

So let’s try to change network profile using PowerShell in Windows 10. This tips work on all Windows clients and Servers.

1. Open PowerShell and run it as administrator. Then type “Get-NetAdapter” and press enter to see all network adapters.

Windows 10 Network Adapters

2. To fine the network adapter profiles, type “Get-NetConnectionProfile” and press enter. You can specify the network connection with “-InterfaceAlias” parameter. It show only the exact network connection information.

The network category is public, so try to change to private network with “Set-NetConnectionProfile” cmdlet.

Note: It’s not possible to change the network adapter category to domain when there is no domain available. It’s only change Private network to public and public to private network using PowerShell.

3. To change Public network to Private network, simply type “Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Private” and press enter.

Читайте также:  Windows show mac address table

Change Network Profile Using PowerShell

4. To see the result, type “Get-NetConnectionProfile” or specify the network adapter name with “-InterfaceAlias” parameter.

Change Public Network to Private Network with PowerShell

Good, the public network has been changed to private network successfully. You can do the same to change private network to public.

Hope this simple PowerShell command will help you to change network profiles easily on the enterprise network and home network. So let us know, if you have any question about PowerShell.

Windows server 2012 change network profile

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

Hi i have a query, how to change network profile to public from domain in a server on Windows 2012?

Best Regards Edgar

Answers

Thanks for your post.

If the server is domain joined, when it starts to detect the network location, the machine will contact a DC via port 389. If this detection successful, it will get the domain profile. And we cannot change it. If the domain was not found or process failed, NLA will let you to determine which firewall profile will be used, private or public.

For more information about Network Location Awareness, you may refer to the following article. It also applies to Windows 2012.

Network Location Awareness (NLA) and how it relates to Windows Firewall Profiles

If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.

Windows server 2012 change network profile

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

Hi i have a query, how to change network profile to public from domain in a server on Windows 2012?

Best Regards Edgar

Answers

Thanks for your post.

If the server is domain joined, when it starts to detect the network location, the machine will contact a DC via port 389. If this detection successful, it will get the domain profile. And we cannot change it. If the domain was not found or process failed, NLA will let you to determine which firewall profile will be used, private or public.

For more information about Network Location Awareness, you may refer to the following article. It also applies to Windows 2012.

Network Location Awareness (NLA) and how it relates to Windows Firewall Profiles

If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.

Оцените статью