Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

netsh and schtask startup script

$
0
0

Hi to all!

I am having problems regarding my start-up scripts since the scripts won't take effect. Here are my scripts:

  • (disableinternet.bat)

netsh advfirewall firewall add rule name="blockinternet" protocol=tcp dir=out remoteport=80,443,8080 action=block

  • (schedule task.bat)

schtasks /create /sc daily /tn "Allow Internet" /tr "//DC01/scheduled tasks/enableinternet.bat" /st 12:00
schtasks /create /sc daily /tn "Disable Internet" /tr "//DC01/scheduled tasks/disableinternet.bat" /st 13:00

  • (enableinternet.bat)

netsh advfirewall firewall delete rule name="blockinternet"

I'm creating this script for some domain users to be blocked on using internet during office hours and for them to be able to browse during breaktime and after working hours.

Hoping for any help with Microsoft Community.

Regards,

Ed


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>