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 use it for a plethora of purposes, ranging from executing the simplest of commands to even forcefully updating Windows at times. Assuming you know how to use PowerShell but cannot 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:
In Windows 11, to run PowerShell Scripts locally without Signing:
- Open Windows Settings (Win + I)
- Navigate to System
- 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.
In Windows 10, to run PowerShell Scripts locally without Signing:
- Open Windows 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 an error message. This script will run with the permissions of the user 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 returning them to the server.
I hope the post was useful and you can now run unsigned Windows scripts using PowerShell.
Read next: How to turn on or off Windows PowerShell script execution.