Enabling 'This connection uses the following items' under NIC properties

I am using logon script to add some windows firewall ports exception settings on my server 2003 ent edition domain like 'Netsh firewall add portopening tcp XXXX name1" to all my windows xp clients.  For some reason my clients play around with the NIC properties and uncheck 'client for microsoft networks' , 'File and printer sharing' etc What is the command to put into the logon script to enable or check these items which comes under the NIC properites 'This connection uses the following items:
amanzoorNetwork infrastructure AdminAsked:
Who is Participating?
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.

Rob WilliamsCommented:
You cannot control that ('client for microsoft networks' , 'File and printer sharing' etc) within a basic logon script, unless possibly with VBS, but you can control it to some degree with Group Policy. Also if the users were not admins of their workstations they should not be able to change NIC options.
User Configuration | Administrative templates | Network | Network connections | Prohibit Enabling/Disabling components of a LAN connection
(there are other similar policies in the same 'folder' you may want to look at)

You can also define the port exceptions within group policy if you like:
Computer configuration | administrative templates | network | network connections | domain Profile | Windows firewall: Define port exceptions
The nice thing about group policy is you can define different domain and standard firewall configurations. Standard are applied when the domain is not available, i.e on laptops when out of the office, and you do not want the port exceptions enabled.

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
amanzoorNetwork infrastructure AdminAuthor Commented:
Thanks Robwill
I will look into applying the group policy.  Thanks for your time.
Rob WilliamsCommented:
You are very welcome, thank you amanzoor. Good luck with it.
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

From novice to tech pro — start learning today.