I'm trying to start Cassandra on my Windows laptop and I'm seeing the following error:
WARNING! Powershell script execution unavailable
Please use 'powershell Set-ExecutionPolicy Unrestricted'
on this user-account to run cassandra with fully featured
functionality on this platform.
Starting with legacy startup options
Starting Cassandra Server
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
So I opened Powershell to try and set the ExecutionPolicy to Unrestricted and I get the following:
So I follow this to the registry entry which is described in the error and it seems the key is already set correctly. Am I just missing something obvious? The previous version of Cassandra ran perfectly on my machine, but ever since I updated, this is giving me all kinds of issues.
You must allow the execution of PowerShell Scripts on Windows 7. The default execution policy of PowerShell is called Restricted. In this mode, PowerShell operates as an interactive shell only.
On PowerShell open C:\Windows\system32 directory, and run the command
Set-ExecutionPolicy Unrestricted
Also, it’s a serious security risk if you forget to set the Execution Policy back to Restricted mode.
So, in the same directory don'tforget to run
Set-ExecutionPolicy Restricted
For detailed information click here
"Restricted" is the default policy.
Run the below command to get the policy
Get-ExecutionPolicy -Scope CurrentUser
Run the below to set unrestricted policy
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-5.1&viewFallbackFrom=powershell-Microsoft.PowerShell.Core
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