I started using Visual Studio Code for Powershell scripting. I'd like to turn off the check for unsigned code, but cannot find out how to do this. I have not found anything in the forums either.
Scenario/Problem: You need to be able to run unsigned scripts within PowerShell. Solution: Use the Set-ExecutionPolicy command. You are prompted with a confirmation. Enter Y and press Enter (or just press Enter— Y is the default).
Click the create a launch. From the Select Environment prompt, choose PowerShell. Choose the type of debugging you'd like to use: Launch Current File - Launch and debug the file in the currently active editor window. Launch Script - Launch and debug the specified file or command.
I solved by setting the policy as :
Set-ExecutionPolicy –ExecutionPolicy RemoteSigned
to the Visual code integrated environment running as administrator.
The following blog clearly lists the steps to solve it:
http://donovanbrown.com/post/Using-PowerShell-in-VS-Code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With