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.
Locked
User avatar
MaureenC
Posts: 27
Joined: Thu Mar 06, 2014 6:08 am

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 3159 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 3159 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
Joined: Wed Dec 03, 2014 2:26 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
Joined: Thu Jul 24, 2014 3:26 pm

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: 27
Joined: Thu Mar 06, 2014 6:08 am

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 3159 times

Locked