]
James Perkins closed WFCORE-1031.
---------------------------------
Resolution: Won't Fix
I'm closing this as won't fix as I don't think we want to override these
security settings in the script itself.
You can run with the {{-ExecutionPolicy}} argument to override it from the command line.
For example:
{code}
powershell -ExecutionPolicy Unrestricted -File bin\standalone.ps1
{code}
PS1 scripts invocation ends with "cannot be loaded because
running scripts is disabled on thi s system", affect MS Windows desktop series
-----------------------------------------------------------------------------------------------------------------------------------------
Key: WFCORE-1031
URL:
https://issues.redhat.com/browse/WFCORE-1031
Project: WildFly Core
Issue Type: Bug
Components: Scripts
Reporter: Rostislav Svoboda
Priority: Major
PS1 scripts invocation ends with "cannot be loaded because running scripts is
disabled on thi s system".
This was spotted on Windows 10 but it seems it affect more MS Windows desktop series (at
leas 8.x too) - based on HiChat discussion.
When I open PowerShel, enter the bin folder and run .\standalone.ps1 I get this:
{code}
.\standalone.ps1 : File E:\jboss-eap-7.0\bin\standalone.ps1 cannot be loaded because
running scripts is disabled on this s system.
For more information, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\standalone.ps1
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
{code}
what "helped" is this:
Set-ExecutionPolicy RemoteSigned
but I had to run powershell as administrator because it's changing registry key ...
so well, not straightforward usage of ps1 scripts ... Not everybody is able to run in
admin mode.