Page 1 of 1

PowerShell V7

Posted: Tue Sep 08, 2020 6:58 am
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 (34.84 KiB) Viewed 1757 times
pss7.png (43.71 KiB) Viewed 1757 times
pss5.png (40.54 KiB) Viewed 1757 times
updated to powershell 7.0.3 - restarted pc and still occurring

Re: PowerShell V7

Posted: Tue Sep 08, 2020 8:21 am
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.