פבר19
Written by:
ronen ariely
19/02/2022 18:27 
ERROR:
This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.
Explanation:
programs can be restricted in Windows through the Registry or through Group Policy.
Workaround
Recommended as first test and check if this fit your future need as well.
(1) Try to run powershell from winsows terminal
Windows Terminal (or simply "Terminal") has developed for Windows 10 as a replacement for Windows Console and is the default in windows 11. It is preconfigured to run Command Prompt, PowerShell, WSL, SSH, and Azure Cloud Shell Connector.
To run powershell command you can open the Terminal and run the command: powershell
To open the Termical: press WINDOWS + S to launch the Search menu -> enter ‘Terminal’ in the text field at the top
(2) run powershell as administrator or using a user which is administrator
You can run the Terminal as administrator if you need to run powershell as administrator: right-click on the relevant search result, and select ‘Run as administrator’ from the context menu.
You can also try to run PowerShell as administrator directly: search for PowerShell -> right-click on the relevant search result, and select ‘Run as administrator’
Solution for non-administrator users:
If you are the administrator then you can edit the registry or change the group policy.
(1) To edit the group policy, run the command gpedit.msc
Note: Windows 11 Home Edition does not come with Group Policy Editor (gpedit.msc) pre-installed.
If the group policy editor is not installed then you will get the error: "Windows cannot find ‘gpedit.msc’. Make sure you typed the name correctly, and then try again."
Expand User Configuration.
Expand Administrative Templates.
Expand System.
On the right-hand side locate a setting called "Don’t run specified Windows applications".
Double-click that setting and change it to Not Configured.

(2) Making changes to the registry
THIS IS NOT RECOMMENDED if you are not fully understand what you are doming and fully aware of the consequences! In any case, before changing the registry ALWAYS backup the registry.
to make changes in the registry, open the registry editor by run the command: regedit
Find \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ and delete the key called "DisallowRun" on your own responsibility

https://youtu.be/ZWl5BLJnlYg