Setting Remote Execution Policy off

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
iampedro
Posts: 5
Last visit: Tue Aug 27, 2019 6:11 am

Setting Remote Execution Policy off

Post by iampedro »

Dear All Users,

Right now I have made a powershell script but I need to make sure that ,"powershell -command "& {Set-ExecutionPolicy -ExecutionPolicy unrestricted -Force}" is run first what do you suggest that I do since I am using PowerShell Studio 2018 to make a exe. How can I distribute this exe with this command in it?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Setting Remote Execution Policy off

Post by jvierra »

You really can't do that. Execution Policy can only be set by an administrator and it is permanent.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked