I want to use Powershell v2 inside primalscript, and it will only use v1. If I use tools - Powershell it starts a window in v2 but any that I run with F7 uses version1.
How can I fix this.
Primal Script using Powershell V1 not V2
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- windowsadmin@cameco.com
- Posts: 6
- Last visit: Mon Jun 15, 2015 7:57 am
Primal Script using Powershell V1 not V2
We will look into this issue and get back to you as soon as possible.
David
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Primal Script using Powershell V1 not V2
Currently it only supports a single installation of PowerShell. The issue stems from the fact that the PowerShell v1 and v2 assemblies share the same assembly number, thus it causes a problem when the application calls PowerShell. We will look into this further to see if there is a way around this problem.
David
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- windowsadmin@cameco.com
- Posts: 6
- Last visit: Mon Jun 15, 2015 7:57 am
Primal Script using Powershell V1 not V2
thanks for looking into this. Should I uninstall both versions, and only install the latest?
Primal Script using Powershell V1 not V2
I think you should be fine uninstalling V1 only, but if you want to play it safe you can remove both versions.
David
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- windowsadmin@cameco.com
- Posts: 6
- Last visit: Mon Jun 15, 2015 7:57 am
Primal Script using Powershell V1 not V2
I uninstalled Powershell (there was only 1 shown in the add remove programs) and reinstalled just ctp3, and same result.
I am hoping you have some other ideas. I tried just installing ctp3 and spaien on a different machine and it works correctly.
It seems as if Sapien is using the oldest version on the system, and I don't know how to remove powershell further than the Add/Remove programs option.
I am hoping you have some other ideas. I tried just installing ctp3 and spaien on a different machine and it works correctly.
It seems as if Sapien is using the oldest version on the system, and I don't know how to remove powershell further than the Add/Remove programs option.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Primal Script using Powershell V1 not V2
PrimalScript uses the designated assembly to run PowerShell on a system regardless of PowerShell version.
I suggest you post in a Microsoft powershell forum to obtain information on how to remove old assembly versions.
We will try to do the same from our end.
Alex
I suggest you post in a Microsoft powershell forum to obtain information on how to remove old assembly versions.
We will try to do the same from our end.
Alex
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- windowsadmin@cameco.com
- Posts: 6
- Last visit: Mon Jun 15, 2015 7:57 am
Primal Script using Powershell V1 not V2
If I use -
Tools - PowerShell it uses v2,
Tools - Program and specify the full path to powersehll it uses version 2, Tools - options - environment - Languages - windows Powershell, and specify the path to powershell.exe it still uses a version 1. something is not right here.
I am running the command $host.version in each of the powershell tests
Tools - PowerShell it uses v2,
Tools - Program and specify the full path to powersehll it uses version 2, Tools - options - environment - Languages - windows Powershell, and specify the path to powershell.exe it still uses a version 1. something is not right here.
I am running the command $host.version in each of the powershell tests
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Primal Script using Powershell V1 not V2
PrimalScript uses the PowerShell engine directly when you run scripts internally. That engine is in an assembly called System.Management.Automation.dll. The V1 version is usually found here:
C:Program FilesReference AssembliesMicrosoftWindowsPowerShellv1.0
We do not specifically use that assembly, but whatever is registered as the powershell engine. I assume that on your machine there is some version/assembly confusion.
I will have to do some research on that matter.
Alex
C:Program FilesReference AssembliesMicrosoftWindowsPowerShellv1.0
We do not specifically use that assembly, but whatever is registered as the powershell engine. I assume that on your machine there is some version/assembly confusion.
I will have to do some research on that matter.
Alex
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.