I'm trying to restrict internet access on my computer to only between 8 AM and 12 PM. I found a command to block internet access using the Windows firewall, but I'm struggling to figure out how to schedule tasks to enable and disable this access. I'd like to create a task that enables the internet connection at 8 AM and then disables it again at 12 PM. I'm not very skilled with PowerShell or command lines, so any help with the commands or scheduling would be greatly appreciated!
3 Answers
Have you considered if you could just control this through your router? Many routers offer a way to set time-based access for devices. It's worth checking that option first if you don’t want to manage it all from your computer.
If you're open to using PowerShell, an even simpler option might be: `Get-NetAdapter | Disable-NetAdapter` to disable and `Get-NetAdapter | Enable-NetAdapter` to enable your connection. You can set these commands up in Task Scheduler too! Let me know if you need help creating those tasks.
It sounds like you might be overcomplicating things a bit! Instead of using the firewall, you can just disable your network interface directly. First, find your interface name with the command `netsh interface show interface`. Then, set a scheduled task to disable it like this: `netsh interface set interface "your interface name" admin=disable`. To turn it back on, just replace 'disable' with 'enable' in the same command. Super straightforward!

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures