Enforce / add persistent routes using GPO on 50 subnets

I wud like to add persistent routes for about 50 subnets' PCs using GPO:
Kindly elaborate how this can be done
Who is Participating?

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

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.

put below code in .bat file and add this script as startup script under computer configuration of GPO and apply this GPO to OU containing computers or you may use WMI filter to apply this script on client computers only

route add mask -p
echo off

Open in new window

change subnet and mask with yours

Better option could be add above command as schedule task under GP preference in GPO and once schedule task created as GPP item, go to item properties \ common tab and there you will find option to add IP range under item level targeting so that schedule task will be applied to only specified subnets
sunhuxAuthor Commented:
There are close to 350 subnets in our organization, so we'll need how to do this in WMI filter
& not to do a lot of manual keying in.

Link below has something on this but it lacks the solution of how to specify the 50 subnets:
have you tried GPO preferences to target subnets where you want to push route?
Shaun VermaakTechnical SpecialistCommented:
Persistent routes end up in

Open in new window

Registry values are perfect for GPO registry preferences and you can even have containers  with their own item level filtering

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
Windows OS

From novice to tech pro — start learning today.