Like many people this week, I was trying to run some official Microsoft PowerShell scripts related to “Meltdown” and “Spectre” bugs. But when I tried this, I encountered an error message from PowerShell, telling me that “SpeculationControl.psm1
cannot be loaded because running scripts is disabled on this system. For more information, see
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.”
This is perfectly normal, it is a security feature that is easy to adjust when needed, and will apply to many scripts beyond just this week’s “speculative execution side-channel vulnerabilities” checkers. First things first, make sure you ran PowerShell as an Administrator – right click the icon in your Start Menu and click “Run as Administrator.” If it still doesn’t work, you need to change your Execution Policy. Follow these simple steps:
- type get-executionpolicy and press enter. Jot down the output for later, so you can re-secure your system (mine was “Restricted”).
- type set-executionpolicy remotesigned and press enter.
- Press “Y” and hit Enter to tell it you’re sure you want to change this setting.
- Now, run your desired script. It should output normally.
- After the script runs, I suggest setting your policy back to what it was. Again, mine was “restricted” so I type: set-executionpolicy restricted.
- Type “Y” and hit Enter to once again tell it that you want to change the policy.
And you’re done! I certainly hope that helped someone out there!