How can I add PowerShell 3.0 to my PowerShell Studio 2015?

Ask your PowerShell-related questions, including questions on cmdlet development!
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.
This topic is 8 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
MaureenC
Posts: 30
Last visit: Sun Mar 14, 2021 12:36 pm

How can I add PowerShell 3.0 to my PowerShell Studio 2015?

Post by MaureenC »

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
Console message showing PS 3.0 version
Console message showing PS 3.0 version
PowerShell 3 message.JPG (50.38 KiB) Viewed 4534 times
Attachments
Debug console showing PS 2.0 version
Debug console showing PS 2.0 version
PowerShell 2 msg inside script.JPG (26.15 KiB) Viewed 4534 times
Last edited by MaureenC on Wed Oct 21, 2015 1:09 pm, edited 1 time in total.
User avatar
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?

Post by SAPIEN Support Forums »

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: If you asked in the wrong forum, just copy your question to the right forum.

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
If not, please take a moment to edit your original post or reply to this one.

*** Make sure you do not post any licensing information ***
User avatar
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

Post by juneblender »

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
User avatar
MaureenC
Posts: 30
Last visit: Sun Mar 14, 2021 12:36 pm

Re: How can I add PowerShell 3.0 to my PowerShell Studio 201

Post by MaureenC »

Bingo!

I needed to change the Platform to V3 - 64 Bit and then Refresh the Object Browser Cache.

Thanks for the help!
Powershell 3 fix.JPG
Powershell 3 fix.JPG (17.97 KiB) Viewed 4534 times
This topic is 8 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked