Note:
- some of the commands may return error (task or registry key not found), you can ignore that
# Schedule task:
to make sure the blocking settings are always set, you can create a schedule task to run the script at logon as example
1- copy W10-Block.cmd to C:\Windows directory
2- open command prompt as administrator and execute: