How to Change Network Profiles with PowerShell?
Change Network Profile Using PowerShell
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.
1. Open PowerShell and run it as administrator. Then type “Get-NetAdapter” and press enter to see all 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.
4. To see the result, type “Get-NetConnectionProfile” or specify the network adapter name with “-InterfaceAlias” parameter.
Good, the public network has been changed to private network successfully. You can do the same to change private network to public.
No comments:
Post a Comment