Change Unidentified Network from public in windows 7 – ServerOK
After upgrading Main computer (one that connect to DSL modem) on LAN, other PC’s are able to get internet. But failed to ping on 192.168.0.1.
Method 1
Go to
1
Start
>
Search
>
secpol
.
msc
Navigate to
1
Network
List
Manager
Policies
>
Unidentified
Networks
Double Click and Change Location Type to
1
Private
Warning This means from now on all Unidentified Networks will be set as private!!
Method 2
NOTE: This is temporary solution, on rebooting, changes will be lost
This is caused by Network card that connect to lan with IP 192.168.0.1 is assigned as a “Public Network”. Public Network have many features disabled for security.
To fix this, run “ChangeCategory.psl” on Power Shell running as Administrator.
Copy and paste following content to a text file, save it as ChangeCategory.psl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$
NLMType
=
[
Type
]
:
:
GetTypeFromCLSID
(
‘DCB00C01-570F-4A9B-8D69-199FDBA5723B’
)
$
INetworkListManager
=
[
Activator
]
:
:
CreateInstance
(
$
NLMType
)
$
NLM_ENUM_NETWORK_CONNECTED
=
1
$
NLM_NETWORK_CATEGORY_PUBLIC
=
0x00
$
NLM_NETWORK_CATEGORY_PRIVATE
=
0x01
$
UNIDENTIFIED
=
“Unidentified network”
$
INetworks
=
$
INetworkListManager
.
GetNetworks
(
$
NLM_ENUM_NETWORK_CONNECTED
)
foreach
(
$
INetwork
in
$
INetworks
)
{
$
Name
=
$
INetwork
.
GetName
(
)
$
Category
=
$
INetwork
.
GetCategory
(
)
if
(
$
INetwork
.
IsConnected
–
and
(
$
Category
–
eq
$
NLM_NETWORK_CATEGORY_PUBLIC
)
–
and
(
$
Name
–
eq
$
UNIDENTIFIED
)
)
{
$
INetwork
.
SetCategory
(
$
NLM_NETWORK_CATEGORY_PRIVATE
)
}
}
Now run power shell as administrator.
Type
1
2
set
–
executionpolicy
remotesigned
ChangeCategory
.
ps1
This should be done in folder where ChangeCategory.ps1 is saved.
After doing this, Network and Sharing Center will show
Windows Firewall will show “undefined network” in “Home or work (private) networks”. Being in private network, you get privileges to share, ping etc…
See Windows