Christopher
All in time.
| Reputation: | 607 |
| Rep Power: | 15 |
Officer I
Los Santos Police Department
Very Active
- Feb 3, 2007
- 2,021
In case you're like me and you keep forgetting the exact commands required to get the
This will show you the list of NICs - easiest way to identify them is the Name or InterfaceDescription field which show up in the UI. Once you find the one you want, check its
Use this (and replace
As with before, replace
ifIndex and so forth of one of your network adapters, you can use these instructions to fetch the info and update the network category. I run into this often when a NIC has a public profile, but I need to update it to a private profile. Simply run these commands in a administrator-elevated PowerShell window.List Network Adapters
Code:
Get-NetAdapter
This will show you the list of NICs - easiest way to identify them is the Name or InterfaceDescription field which show up in the UI. Once you find the one you want, check its
ifIndex since you can use this to directly refer to it for fetching info on it or updating it. From here on, we'll refer to this as the IndexNumber.Set Category to Private
Code:
Set-NetConnectionProfile -InterfaceIndex <YourIndexNumber> -NetworkCategory Private
Use this (and replace
<IndexNumber> with your actual IndexNumber) to set the interface to a private interface.Example
For example, if your IndexNumber is 2, you'd use:
Code:
Set-NetConnectionProfile -InterfaceIndex 2 -NetworkCategory Private
Set Category to Private
If you want to do the opposite and instead make a NIC that has a private profile a public one, use this instead:
Code:
Set-NetConnectionProfile -InterfaceIndex <YourIndexNumber> -NetworkCategory Public
As with before, replace
<IndexNumber> with your actual IndexNumber to set the interface to a public interface.Example
For example, if your IndexNumber is 2, you'd use:
Code:
Set-NetConnectionProfile -InterfaceIndex 2 -NetworkCategory Public
