I am using PowerShell Studio 2015 64 bit on a Windows 7 Enterprise laptop. I have recently installed the Windows Management Framework 3.0 (aka PowerShell 3.0) onto my laptop as well as VMware's PowerCLI 6.0.
I have rebooted my computer and refreshed the cache in PowerShell Studio, but it is still pointing to Powershell 2.0 when I run my script. Note, PSStudio found my PowerCLI module and is displaying them in the object browser.
If I launch PSStudio, open the Console window and enter $psVersionTable it clearly says PSVersion = 3.0.
However, when I run my script, the Debug Console shows PSVersion 2.0 in that variable and in the script output.
How, do I get the script to recognize PS 3.0? Is there a module I need to Import?
Thanks,
Maureen
Screenshot of regular console with 3.0 and debug console with only PS 2.0
How can I add PowerShell 3.0 to my PowerShell Studio 2015?
Forum rules
Do not post any licensing information in this forum.
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 any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
How can I add PowerShell 3.0 to my PowerShell Studio 2015?
- Attachments
-
- Debug console showing PS 2.0 version
- PowerShell 2 msg inside script.JPG (26.15 KiB) Viewed 4535 times
Last edited by MaureenC on Wed Oct 21, 2015 1:09 pm, edited 1 time in total.
- SAPIEN Support Forums
- Posts: 945
- Last visit: Thu Oct 22, 2015 1:10 pm
How can I add PowerShell 3.0 to my PowerShell Studio 2015?
This is an automated post. A real person will respond soon.
Thank you for posting, MaureenC.
Here are some hints to help you get an accurate and complete answer to your question.
Ask in the best forum:
Anticipate follow-up questions!
Did you remember to include the following?
*** Make sure you do not post any licensing information ***
Thank you for posting, MaureenC.
Here are some hints to help you get an accurate and complete answer to your question.
Ask in the best forum:
- - Scripting question? For questions about Windows PowerShell or other scripting languages, use Scripting Answers.
- Software question? For questions about PowerShell Studio, PrimalScript, or other SAPIEN products, use Product Support Forums for Registered Customers.
- Trial question? For questions about trial versions of any SAPIEN product, use Trial Software Questions.
Anticipate follow-up questions!
Did you remember to include the following?
- 1. Product, version and build
2. 32 or 64 bit product
3. Operating system, e.g. Windows 7 64 bit.
4. Attach a screenshot, if applicable
5. Attach logs, crash reports, etc., in a ZIP file
*** Make sure you do not post any licensing information ***
- juneblender
- Posts: 93
- Last visit: Thu Mar 30, 2017 8:54 am
Re: How can I add PowerShell 3.0 to my PowerShell Studio 201
Hi, Maureen,
I think this blog post might help. If you're still stuck, let me know.
https://www.sapien.com/blog/2013/02/25/ ... owershell/
-- JuneB
I think this blog post might help. If you're still stuck, let me know.
https://www.sapien.com/blog/2013/02/25/ ... owershell/
-- JuneB
Re: How can I add PowerShell 3.0 to my PowerShell Studio 201
Bingo!
I needed to change the Platform to V3 - 64 Bit and then Refresh the Object Browser Cache.
Thanks for the help!
I needed to change the Platform to V3 - 64 Bit and then Refresh the Object Browser Cache.
Thanks for the help!