Change network category from "Private Network" to "Domain Network"

What PowerShell command or set of commands can I use to change a "Private network" type to a "Domain network" type within the "Network and Sharing Center" applet within Windows 10? (See the screenshots.)

Domain networkPrivate network
IT GuyNetwork EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ITguy565Commented:
This should assist with this..

https://www.itechtics.com/change-network-type-windows-10/

Run the following command:
Get-NetConnectionProfile
See the network name you want to change its type and run the following command:
Set-NetConnectionProfile -Name “ITT” -NetworkCategory Public
Where ITT is the name of your network and you can change the -NetworkCategory switch value to Public or Private.
0
JohnBusiness Consultant (Owner)Commented:
If you have Windows 10 V1709, click on the Wireless Icon and select Properties of your wireless connection. You can set public / private there. New addition to Windows 10.
0
ITguy565Commented:
Here is another site which explains it better for domain authenticated  :

https://atlantaitservice.com/techtips/set-windows-network-location-private-domain
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

David AtkinTechnical DirectorCommented:
If you're not using IPv6 try disabling it on the NIC.  We've had similar problems with some routers provided by one of our ISPs.  Doesn't seam to matter if you disable it on the router.
0
JohnBusiness Consultant (Owner)Commented:
Please be careful disabling IPv6. It is coming into use and on a properly working machine does not cause any harm.

You could disable on a router as it can easily be reset to hardware specifications.
1
ITguy565Commented:
Did I miss something? Isn't he only looking for
What PowerShell command or set of commands can I use to change a "Private network" type to a "Domain network" type within the "Network and Sharing Center" applet within Windows 10? (See the screenshots.)

I could be wrong, but his ticket is only about a powershell command :P
0
David AtkinTechnical DirectorCommented:
Please be careful disabling IPv6. It is coming into use and on a properly working machine does not cause any harm.

You could disable on a router as it can easily be reset to hardware specifications.

Hence the precursor about not using it. And the routers in question are some TP-Link ones, really doesn't matter if you disable it on the router, it still pushes.  It's been reported to the manufacturer as an issue.  

Also
Did I miss something? Isn't he only looking for
.  No you've understood correctly, I've just thought outside of the question to something I know I've had a problem with.
0
DrDave242Senior Support EngineerCommented:
I don't believe there's a way to manually set the "Domain network" profile on a machine; it should be automatically set to this profile if the machine is a domain member and is able to authenticate to a domain controller.
0
footechCommented:
My understanding is the same as DrDave242.  You can manually set the type to either Private (Work/Home) or Public, but the Domain type only happens when when conditions are met.  Taken from https://blogs.technet.microsoft.com/networking/2010/09/08/network-location-awareness-nla-and-how-it-relates-to-windows-firewall-profiles/
If the Connection Specific DNS Name matches the “HKEY_Local_Machine\Software\Microsoft\Windows\CurrentVersion\Group Policy\History\NetworkName” registry key then the machine will attempt to contact a Domain Controller via LDAP. If both these steps succeed, you will get the Domain profile.
0
ITguy565Commented:
Please review the two articles I presented above. They show exactly how to do this power shell
0
IT GuyNetwork EngineerAuthor Commented:
When I attempt to change the "Unidentified network" from a "Private network" to a "Domain network" using the power shell command shown below (which has been run in an elevated PowerShell) I receive the error message shown below and in the second screenshot.

I receive this error message within Windows 10 which has Hyper-V installed.

What can I do to change the "Unidentified network" from a private network to a domain network?

Set-NetConnectionProfile  -InterfaceIndex 2 -NetworkCategory DomainAuthenticated

Open in new window


Error message received:

PS C:\WINDOWS\system32> Get-NetConnectionProfile


Name             : Unidentified network
InterfaceAlias   : vEthernet (Default Switch)
InterfaceIndex   : 14
NetworkCategory  : Private
IPv4Connectivity : NoTraffic
IPv6Connectivity : NoTraffic

Name             : domain.com
InterfaceAlias   : Ethernet
InterfaceIndex   : 18
NetworkCategory  : DomainAuthenticated
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic



PS C:\WINDOWS\system32> Set-NetConnectionProfile  -InterfaceIndex 14 -NetworkCategory DomainAuthenticated
Set-NetConnectionProfile : Unable to set NetworkCategory to 'DomainAuthenticated'.  This NetworkCategory type will be
set automatically when authenticated to a domain network.
At line:1 char:1
+ Set-NetConnectionProfile  -InterfaceIndex 14 -NetworkCategory DomainA ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (MSFT_NetConnect...86E03658720A}"):root/StandardCi...nnectionProfile) [
   Set-NetConnectionProfile], CimException
    + FullyQualifiedErrorId : MI RESULT 4,Set-NetConnectionProfile

PS C:\WINDOWS\system32>

Screenshot 1:
Unidentified network private network type
Screenshot 2:
PowerShell error message
PowerShell error message
0
DrDave242Senior Support EngineerCommented:
Unable to set NetworkCategory to 'DomainAuthenticated'.  This NetworkCategory type will be set automatically when authenticated to a domain network.

This backs up what I said above. If the machine is joined to a domain, it appears to be having trouble authenticating with a domain controller.

EDIT: I just looked more closely at the Powershell screenshot above. You appear to be trying to change this setting on an adapter that has no network connectivity at all (IPv4Connectivity and IPv6Connectivity both show NoTraffic). Why?
0
IT GuyNetwork EngineerAuthor Commented:
This is the network adapter that is created on all of the Windows 10 computers as soon as Hyper-V is installed.

Hyper-V has been installed using the default settings but the Virtual switch hasn't been configured or set up in any special ways.

What changes need to be made to the Hyper-V configuration (with the virtual network switch) to fix this issue?

I'm hoping that someone with good Hyper-V experience can provide suggestions on what changes or configurations need to be made.
0
footechCommented:
The default vSwitch created with Hyper-V is of type "internal".  Check out it's status on the network connections (or by running ipconfig) and you will see it has an IP that is not on your network.

For a vSwitch to show as DomainAuthenticated, you would need to configure it as type "External" and set it to allow the management OS to share the adapter.  At this point the vSwitch gets the IP that previously the host's adapter (named 'Ethernet' in your example above) had.

i think it helps to think of the vSwitch as an actual switch.  A switch isn't authenticating to your domain.  Even when set as I've described above, the network category is reflecting the shared nature of the adapter with the domain-joined host, not really the vSwitch.

This is really wandering off the original question in scope, so I would suggest opening a new question in regards to Hyper-V vSwitches if you have related issues.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.