You might just need this.
Turns out Windows already gives you all the tools you need to block distracting apps and websites—you just have to put them ...
You can invoke PowerShell scripts or script blocks in an elevated context with sudo or test your credentials against the local system or an Active Directory domain ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results