PowerShell V7

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
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.
User avatar
Reddrgn2
Posts: 39
Joined: Wed May 23, 2018 6:13 am

PowerShell V7

Post by Reddrgn2 »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: primal script 2020 - version 7.7.144
Operating system: win 10 enter
PowerShell version: 5.1 and 7
OS: 64 bit

This is not really a problem more as a little bug or inconvenience, to me at least.

I am working on vmware scripts - basic things info gathering - vm's names, ip's,host, etc. I save the scripts in their own folder then make a common commands ps1 page with with description of what it will do and the path to the script (so not to have the long sometimes jumbled script hanging around). Running the script from this page works no problem. The issue is when using Primalscripts file browser option, not only to view the location/name of script but when I right click and "run script" I am starting to get error. In the output window I am getting "Cannot instantiate PowerShell V7 object: 0" at the top of the ribbon, yes I am using v7. I have tried v5.1 but get slightly different error, says right now I am not connected to any servers, little strange but i know that its not using the or seeing the connection that v7 is using/has.

Again not really a problem not being able to right click from the file browser and "run script". Yes I have tried to use "run in shell"- it works. Just little strange before updating to PScript (newest version, not sure what it was last week) they both worked.
-oh i updated primalscript via its update system - i do have ps v7 installed for ISE and normal PS. I try to stay in Primalscript when building,testing and day to day stuff

Any thoughts or is possibly bug or did i miss something
(my bet is on me missing something or not doing something :) )

**updated instead of reply **
screen shot 'run script' is the one having issue with - 'run in shell' works no issue
-
pss.png
pss.png (34.84 KiB) Viewed 170 times
pss7.png
pss7.png (43.71 KiB) Viewed 170 times
pss5.png
pss5.png (40.54 KiB) Viewed 170 times
**update**
updated to powershell 7.0.3 - restarted pc and still occurring
Last edited by Reddrgn2 on Tue Sep 08, 2020 10:00 am, edited 2 times in total.

User avatar
Alexander Riedel
Posts: 7458
Joined: Tue May 29, 2007 4:43 pm

Re: PowerShell V7

Post by Alexander Riedel »

We are not quite sure where you run the scripts from, so a screen should would help.
Additionally, please indicate the exact PowerShell 7 version. It's quite important, as there are huge differences between 7.0.0 and the latest 7.0.3.
PrimalScript was recently updated to use 7.0.3, so maybe that is the culprit. So please include the output if $psversiontable from a PowerShell 7 console.
Alexander Riedel
SAPIEN Technologies, Inc.