I have removed the virus by Eset on my Surface Pro 3 tablet running Windows 10 Fall Creator updates. After restarting the system, I login to my desktop and double click on PowerShell from Start menu. It is not opened and just pops up the “This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.” message.
Then I figure out the DisallowRun registry block the built-in app to access, even using administrator account. I open the tree below in the left pane of Registry Editor:
and delete the key called DisallowRun. I could open the PowerShell normally. However, after I make the rebooting, it restores the registry and the same issue happens again. Here are some useful tips to get rid of that.
* If you have already installed the Smadav program or similar tools like hardentools.exe, it casues the powershell running into issue. You don’t need to uninstall it completely. Open the main screen of Smadav software, click on Protection option, and click “Allow Windows Script”, then restart Windows 10 to take effect.
A policy basically disables a default Windows feature. You could make changes in Group Policy on Windows 10 Pro or Enterprise version.
* From your desktop, type gpedit.msc in Start menu or Search box, and select Local Group Policy Editor from results.
* Expand the User Configuration, navigate to Administrative Templates > System.
* Go to the right side pane, double-click the “Don’t run specified Windows applications” setting, check Not Configured box, and click OK > Apply button.
Once the restrictions have removed in Windows 10, you will be able to use Powershell to execute the commands.