Setting Remote Execution Policy off

Ask your Windows 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.
Locked
User avatar
iampedro
Posts: 5
Joined: Wed Dec 18, 2013 12:40 pm

Setting Remote Execution Policy off

Post by iampedro » Wed Jul 25, 2018 11:12 am

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?

User avatar
jvierra
Posts: 13280
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Setting Remote Execution Policy off

Post by jvierra » Wed Jul 25, 2018 11:46 am

You really can't do that. Execution Policy can only be set by an administrator and it is permanent.

Locked