Adding static route through group policy

According to some documentation I found,

Routes added by using the -p option are stored in the registry under the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip \Parameters\PersistentRoutes

Perhaps you could just use Group Policy Preferences to set the appropriate entries directly in the registry?


I had the exact same problem, and my solution was the easiest "if not silliest" thing you can think of.

All I had to do to make the script work using Group Policy was to add entire command inside quotes ("), so the command route add 172.17.10.0 mask 255.255.0.0 172.16.12.100 -p should be "route add 172.17.10.0 mask 255.255.0.0 172.16.12.100 -p"

Agree with joeqwerty comment about fixing the subnet or the network ID.