Windows PowerShell is a powerful terminal from Microsoft which allows you to automate and script tasks on Windows machines and interact with many of the applications available on them. It is a huge improvement over Command Prompt and is mostly aimed towards developers.
While there are people who are unaware of its true power, those who know their way around it used it for a plethora of purposes, ranging from executing the simplest of commands, to even forcefully updating Windows at times. Assuming you are one of those who do knows how to use the PowerShell, but are not able to execute command lines on the terminal because you’re not signed in locally to the computer under operation here, this post is for you. While this is a very common issue that several people face, the solution to it is just as basic.
By default, Windows doesn’t allow you to run each and every script, especially those which try to change system settings in Windows. In this post, we will share how you can run a PowerShell script without signing.
What are signed PowerShell Scripts?
A signed script means it has been authorized or confirmed by an IT admin and carries a signature with an expiry date. It is similar to certificates on Windows or SSL certificates that are available on Websites. In short, Windows treats this as trusted.
Run PowerShell Scripts locally without Signing
When you are testing a script that doesn’t need signing, a different approach is required. It can be from either a trusted source, or you have developed it yourself. The certificate is not needed. So to run local PowerShell scripts without signing, follow these steps:
- Open Windows 10 Settings (Win + I)
- Navigate to Update and Security
- Select For developers from the left side
- Locate the PowerShell section
- Select Change execution policy to allow local PowerShell scripts to run without signing
- Now click on the Show Settings link, and it will open PowerShell window.
The window will display information about ExecutionPolicy, the option, and other settings. Remote scripts will still require signing.
To confirm, open PowerShell, execute your script, and you should not see any error message. This script will run with the permissions of the user that is running the PowerShell session.
This feature is extremely useful to organizations that only have domain-joined machines. It allows you to run scripts on client machines before pushing them back to the server.
I hope the post was useful, and you are now able to run unsigned scripts in Windows using PowerShell.
Read next: How to turn on or off Windows PowerShell script execution.